java.net.SocketException: Connection reset

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

It's possible you're trying to write to a connection that's already closed. Another cause for this is that you closed the socket with unread data in the socket receive buffer.


rafael
tip

This might be caused by unmatching versions of SSL. Java starts normally with SSLv2 and your server might not be able to negotiate. You have to force Java to use SSLv3. See this comment: https://goo.gl/hx0YB3


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Running loanbroker esb returns the following error: INFO 2010-03-02 16:17:49,375 [connector.axis.0.dispatcher.2] org.mule.transport.soap.axis.AxisMessageDispatcher: Connected: endpoint.outbound.http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,390 [connector.axis.0.dispatcher.1] org.mule.transport.soap.axis.AxisMessageDispatcher: Connected: endpoint.outbound.http://localhost:10080/mule/TheBank1?method=getLoanQuote INFO 2010-03-02 16:17:49,718 [connector.axis.0.dispatcher.1] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2010-03-02 16:17:49,718 [connector.axis.0.dispatcher.2] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest WARN 2010-03-02 16:17:49,765 [connector.axis.0.dispatcher.2] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'ObjectToHttpMethod'. The previous object will be overwritten. INFO 2010-03-02 16:17:49,953 [connector.axis.0.dispatcher.2] org.mule.transport.soap.axis.extensions.UniversalSender: Making Axis soap request on: http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,953 [connector.axis.0.dispatcher.1] org.mule.transport.soap.axis.extensions.UniversalSender: Making Axis soap request on: http://localhost:10080/mule/TheBank1?method=getLoanQuote INFO 2010-03-02 16:17:49,968 [connector.http.0.dispatcher.2] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,968 [connector.http.0.dispatcher.1] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.http://localhost:10080/mule/TheBank1?method=getLoanQuote ERROR 2010-03-02 16:17:50,156 [connector.http.0.dispatcher.1] org.mule.DefaultExceptionStrategy: ******************************************************************************** Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:10080/mule/TheBank1?method=getLoanQuote, connector=HttpConnector{this=992725, started=true, initialised=true, name='connector.http.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[http], serviceOverrides=null}, transformer=[ObjectToHttpClientMethodRequest{this=10e07c0, name='ObjectToHttpMethod', ignoreBadInput=false, returnClass=interface org.apache.commons.httpclient.HttpMethod, sourceTypes=[interface org.mule.api.MuleMessage, class [B, class java.lang.String, class java.io.InputStream, interface org.mule.api.transport.OutputHandler, class org.mule.transport.NullPayload]}], name='endpoint.http.localhost.10080.mule.TheBank1.method.getLoanQuote', properties={method=getLoanQuote}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8}. Message payload is of type: PostMethod Type : org.mule.api.transport.DispatchException Code : MULE_ERROR-42999 Payload : org.apache.commons.httpclient.methods.PostMethod@abb3e0 JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html ******************************************************************************** Exception stack is: 1. Connection reset (java.net.SocketException) java.net.SocketInputStream:-1 (null) 2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:10080/mule/TheBank1?method=getLoanQuote, connector=HttpConnector{this=992725, started=true, initialised=true, name='connector.http.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[http], serviceOverrides=null}, transformer=[ObjectToHttpClientMethodRequest{this=10e07c0, name='ObjectToHttpMethod', ignoreBadInput=false, returnClass=interface org.apache.commons.httpclient.HttpMethod, sourceTypes=[interface org.mule.api.MuleMessage, class [B, class java.lang.String, class java.io.InputStream, interface org.mule.api.transport.OutputHandler, class org.mule.transport.NullPayload]}], name='endpoint.http.localhost.10080.mule.TheBank1.method.getLoanQuote', properties={method=getLoanQuote}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException) org.mule.transport.http.HttpClientMessageDispatcher:130 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html) ******************************************************************************** Root Exception stack trace: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:123) at org.mule.transport.http.HttpClientMessageDispatcher.doDispatch(HttpClientMessageDispatcher.java:97) at org.mule.transport.AbstractMessageDispatcher$Worker.doRun(AbstractMessageDispatcher.java:278) at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:41) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source) ******************************************************************************** INFO 2010-03-02 16:17:50,421 [connector.http.0.receiver.6] org.mule.example.loanbroker.bank.Bank: Returning Rate is: TheBank2, rate: 6.288210100786355 INFO 2010-03-02 16:17:50,437 [connector.http.0.receiver.6] org.mule.transport.DefaultReplyToHandler: reply to sent: DefaultOutboundEndpoint{endpointUri=jms://esb.loan.quotes, connector=ActiveMQJmsConnector{this=182c2d9, started=true, initialised=true, name='jmsConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides=null}, transformer=[ObjectToJMSMessage{this=18c69a9, name='ObjectToMessage', ignoreBadInput=false, returnClass=interface javax.jms.Message, sourceTypes=[]}], name='LoanQuotes', properties={}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8} INFO 2010-03-02 16:17:50,437 [jmsConnector.dispatcher.1] com.mulesource.mule.transport.jms.EeJmsMessageDispatcher: Connected: endpoint.outbound.jms://esb.loan.quotes WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.request is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_request WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.method is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_method WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.request.path is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_request_path WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.context.path is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_context_path WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.version is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_version
    via by Daniel Zapata,
  • Running loanbroker esb returns the following error: INFO 2010-03-02 16:17:49,375 [connector.axis.0.dispatcher.2] org.mule.transport.soap.axis.AxisMessageDispatcher: Connected: endpoint.outbound.http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,390 [connector.axis.0.dispatcher.1] org.mule.transport.soap.axis.AxisMessageDispatcher: Connected: endpoint.outbound.http://localhost:10080/mule/TheBank1?method=getLoanQuote INFO 2010-03-02 16:17:49,718 [connector.axis.0.dispatcher.1] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest INFO 2010-03-02 16:17:49,718 [connector.axis.0.dispatcher.2] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest WARN 2010-03-02 16:17:49,765 [connector.axis.0.dispatcher.2] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'ObjectToHttpMethod'. The previous object will be overwritten. INFO 2010-03-02 16:17:49,953 [connector.axis.0.dispatcher.2] org.mule.transport.soap.axis.extensions.UniversalSender: Making Axis soap request on: http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,953 [connector.axis.0.dispatcher.1] org.mule.transport.soap.axis.extensions.UniversalSender: Making Axis soap request on: http://localhost:10080/mule/TheBank1?method=getLoanQuote INFO 2010-03-02 16:17:49,968 [connector.http.0.dispatcher.2] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.http://localhost:20080/mule/TheBank2?method=getLoanQuote INFO 2010-03-02 16:17:49,968 [connector.http.0.dispatcher.1] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.http://localhost:10080/mule/TheBank1?method=getLoanQuote ERROR 2010-03-02 16:17:50,156 [connector.http.0.dispatcher.1] org.mule.DefaultExceptionStrategy: ******************************************************************************** Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:10080/mule/TheBank1?method=getLoanQuote, connector=HttpConnector{this=992725, started=true, initialised=true, name='connector.http.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[http], serviceOverrides=null}, transformer=[ObjectToHttpClientMethodRequest{this=10e07c0, name='ObjectToHttpMethod', ignoreBadInput=false, returnClass=interface org.apache.commons.httpclient.HttpMethod, sourceTypes=[interface org.mule.api.MuleMessage, class [B, class java.lang.String, class java.io.InputStream, interface org.mule.api.transport.OutputHandler, class org.mule.transport.NullPayload]}], name='endpoint.http.localhost.10080.mule.TheBank1.method.getLoanQuote', properties={method=getLoanQuote}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8}. Message payload is of type: PostMethod Type : org.mule.api.transport.DispatchException Code : MULE_ERROR-42999 Payload : org.apache.commons.httpclient.methods.PostMethod@abb3e0 JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html ******************************************************************************** Exception stack is: 1. Connection reset (java.net.SocketException) java.net.SocketInputStream:-1 (null) 2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:10080/mule/TheBank1?method=getLoanQuote, connector=HttpConnector{this=992725, started=true, initialised=true, name='connector.http.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[http], serviceOverrides=null}, transformer=[ObjectToHttpClientMethodRequest{this=10e07c0, name='ObjectToHttpMethod', ignoreBadInput=false, returnClass=interface org.apache.commons.httpclient.HttpMethod, sourceTypes=[interface org.mule.api.MuleMessage, class [B, class java.lang.String, class java.io.InputStream, interface org.mule.api.transport.OutputHandler, class org.mule.transport.NullPayload]}], name='endpoint.http.localhost.10080.mule.TheBank1.method.getLoanQuote', properties={method=getLoanQuote}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException) org.mule.transport.http.HttpClientMessageDispatcher:130 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html) ******************************************************************************** Root Exception stack trace: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:123) at org.mule.transport.http.HttpClientMessageDispatcher.doDispatch(HttpClientMessageDispatcher.java:97) at org.mule.transport.AbstractMessageDispatcher$Worker.doRun(AbstractMessageDispatcher.java:278) at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:41) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source) ******************************************************************************** INFO 2010-03-02 16:17:50,421 [connector.http.0.receiver.6] org.mule.example.loanbroker.bank.Bank: Returning Rate is: TheBank2, rate: 6.288210100786355 INFO 2010-03-02 16:17:50,437 [connector.http.0.receiver.6] org.mule.transport.DefaultReplyToHandler: reply to sent: DefaultOutboundEndpoint{endpointUri=jms://esb.loan.quotes, connector=ActiveMQJmsConnector{this=182c2d9, started=true, initialised=true, name='jmsConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides=null}, transformer=[ObjectToJMSMessage{this=18c69a9, name='ObjectToMessage', ignoreBadInput=false, returnClass=interface javax.jms.Message, sourceTypes=[]}], name='LoanQuotes', properties={}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8} INFO 2010-03-02 16:17:50,437 [jmsConnector.dispatcher.1] com.mulesource.mule.transport.jms.EeJmsMessageDispatcher: Connected: endpoint.outbound.jms://esb.loan.quotes WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.request is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_request WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.method is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_method WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.request.path is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_request_path WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.context.path is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_context_path WARN 2010-03-02 16:17:50,453 [jmsConnector.dispatcher.1] org.mule.transport.jms.JmsMessageUtils: Header: http.version is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to http_version
    via by Daniel Zapata,
  • WSDL 中 ENDPOINT
    via by Unknown author,
  • Axis2 NoSuchMethodError
    via by Remi Desreumaux,
  • 404 error
    via GitHub by xuniyuqi
    ,
  • I/O-Error when connection is lost
    via GitHub by karfau
    ,
  • Connection reset
    via GitHub by skodape
    ,
  • "Connection Reset" occurs in Solr client side
    via Stack Overflow by Vance
    ,
    • java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:123) at org.mule.transport.http.HttpClientMessageDispatcher.doDispatch(HttpClientMessageDispatcher.java:97) at org.mule.transport.AbstractMessageDispatcher$Worker.doRun(AbstractMessageDispatcher.java:278) at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:41) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    Nikolay Rybak
    Nikolay Rybak1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    mauritius
    mauritius2 times, last one,
    Unknown visitor1 times, last one,
    195 more bugmates