java.net.SocketException: Connection reset

Stack Overflow | Sandeep Yadav | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug 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
  2. 0

    apache httpclient 4.5.1 making only SSL conections to non-ssl sites, and failing

    Stack Overflow | 1 year ago | Praveen
    java.lang.Exception: Searching source item B00OFLNE1C threw an error: Connection reset .....
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    cURL works, but an identical request in Apache's HttpComponents library does not?

    Stack Overflow | 3 years ago | LartTyler
    java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
  5. 0

    Build spring-boot from sources failed with UndertowEmbeddedServletContainerFactoryTests.sslRestrictedProtocolsECDHETLS1Failure

    Stack Overflow | 6 months ago | Anton Fedotov
    java.lang.Exception: Unexpected exception, expected<javax.net.ssl.SSLHandshakeException> but was<java.net.SocketException>
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketException

    Connection reset

    at java.net.SocketInputStream.read()
  2. Java RT
    SocketInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:196)
    2. java.net.SocketInputStream.read(SocketInputStream.java:122)
    2 frames
  3. Java JSSE
    SSLSocketImpl.startHandshake
    1. sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
    2. sun.security.ssl.InputRecord.read(InputRecord.java:480)
    3. sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
    4. sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
    5. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
    6. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
    6 frames
  4. Apache HttpClient
    CloseableHttpClient.execute
    1. org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)
    2. org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
    3. org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
    4. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
    5. org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
    6. org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
    7. org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
    8. org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    9. org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
    10. org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    11. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    12. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
    13. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
    13 frames
  5. com.qssinc.automation
    Sampler.testSSL
    1. com.qssinc.automation.restapi.tests.login.Sampler.testSSL(Sampler.java:78)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  7. TestNG
    RemoteTestNG.main
    1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
    2. org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
    3. org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
    4. org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
    5. org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
    6. org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
    7. org.testng.TestRunner.privateRun(TestRunner.java:773)
    8. org.testng.TestRunner.run(TestRunner.java:623)
    9. org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
    10. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
    11. org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
    12. org.testng.SuiteRunner.run(SuiteRunner.java:259)
    13. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    14. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    15. org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
    16. org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
    17. org.testng.TestNG.run(TestNG.java:1018)
    18. org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    19. org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    20. org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
    20 frames