DFS - Connection reset by peer: socket write error

LawrenceLow
edited November 9, 2016 in Documentum #1

Dear all,

Our setup: -

DFS 6.6(P05) running on Apache Tomcat 6.0 is integrated with BSS self-service portal with third-party application to retrieve document.

We received the following error message intermittently: -

Nov 1, 2016 8:59:01 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet

SEVERE: caught throwable

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException

- with linked exception:

[ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error]

  at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:322)

  at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)

  at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)

  at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)

  at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)

  at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)

  at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)

  at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)

  at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)

  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)

  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)

  at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)

  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

  at java.lang.Thread.run(Thread.java:619)

Caused by: javax.xml.bind.MarshalException

- with linked exception:

[ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error]

  at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:284)

  at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:100)

  at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)

  at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:315)

  ... 25 more

Caused by: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error

  at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)

  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)

  at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)

  at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)

  at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)

  at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)

  at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.flushBuffer(UTF8XmlOutput.java:401)

  at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:354)

  at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.writeTo(Base64Data.java:299)

  at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:301)

  at com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:341)

  at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$PcdataImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:177)

  at com.sun.xml.bind.v2.runtime.MimeTypedTransducer.writeLeafElement(MimeTypedTransducer.java:92)

  at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(TransducedAccessor.java:250)

  at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(SingleElementLeafProperty.java:98)

  at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)

  at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)

  at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)

  at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)

  at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)

  at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)

  at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)

  at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)

  at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)

  at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)

  at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)

  at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)

  at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:150)

  at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)

  at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)

  at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:277)

  ... 28 more

Caused by: java.net.SocketException: Connection reset by peer: socket write error

  at java.net.SocketOutputStream.socketWrite0(Native Method)

  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

  at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740)

  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)

  at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)

  at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)

  at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)

  at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573)

  at org.apache.coyote.Response.doWrite(Response.java:560)

  at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)

  ... 58 more

What could be the root cause that could triggered the "connection reset by peer" error message? From our understanding (correct me if I am wrong) we found that ClientAbortException stated in the log file - is it referring to BSS in this case?

Please advise.

Thanks.

Lawrence Low

Comments

  • This exception usually means that you have written to an connection that had already been loses by the peer. In other words, an application protocol error. Connection reset simply means that a TCP RST was received. TCP RST packet is that the remote side telling you the connection on which the previous TCP packet is sent is not recognized, maybe the connection has closed, maybe the port is not open, and something like these. A reset packet is simply one with no payload and with the RST bit set in the TCP header flags.

    The following are possible causes for the error:

    • More commonly, it is caused by writing to a connection that the other end has already closed normally. In other words an application protocol error.
    • It can also be caused by closing a socket when there is unread data in the socket receive buffer.
    • The TCP (Transmission Control Protocol) socket is closed because the socket received a close command from a remote machine.
    • Sometimes this can also be due to heavy load causing Server to queue the message and before it can read the message is got timed out at the client end. So you can also check server health and log for excessive load causing this error.