java.net.SocketException

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.

  • When trying to build a small local test project, it failed giving me a ClassNotFoundException: hudson.remoting.Launcher. I eventually figured out the problem: Jetty unpacks the files of the war in a temporary file under my profile folder in windows. Unfortunately I had a norwegian username with the norwegian letter "å", and this was not handled correctly with the remoting-2.52.jar dependency. (The other dependencies seemed to be fine) Changing my username, folder name and a registry key fixed the problem for me. {color:red}This is the output I got when trying to build a small testproject:{color} Started by user anonymous Building in workspace C:\Users\Håvard\.jenkins\jobs\CI\workspace > git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git.exe config remote.origin.url file:///F:/Kurs%20fasit/git # timeout=10 Fetching upstream changes from file:///F:/Kurs fasit/git > git.exe --version # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress file:///F:/Kurs fasit/git +refs/heads/*:refs/remotes/origin/* > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision f9878edebfb6ed3530d875098b72759d69744ef8 (refs/remotes/origin/master) > git.exe config core.sparsecheckout # timeout=10 > git.exe checkout -f f9878edebfb6ed3530d875098b72759d69744ef8 > git.exe rev-list f9878edebfb6ed3530d875098b72759d69744ef8 # timeout=10 Parsing POMs Established TCP socket on 13308 [CI-parent] $ "C:\Program Files\Java\jdk1.8.0_66/bin/java" -cp C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;F:\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;F:\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main F:\apache-maven-3.2.5 C:\Users\H?vard\AppData\Local\Temp\jetty-0.0.0.0-8080-jenkins.war-_jenkins-any-3884816799918590233.dir\webapp\WEB-INF\lib\remoting-2.52.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 13308 Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74) ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to C:\Program Files\Java\jdk1.8.0_66 Established TCP socket on 13310 [CI-parent] $ "C:\Program Files\Java\jre1.8.0_66/bin/java" -cp C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;F:\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;F:\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main F:\apache-maven-3.2.5 C:\Users\H?vard\AppData\Local\Temp\jetty-0.0.0.0-8080-jenkins.war-_jenkins-any-3884816799918590233.dir\webapp\WEB-INF\lib\remoting-2.52.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 13310 Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74) ERROR: Failed to parse POMs java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:331) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:282) at hudson.slaves.Channels.forProcess(Channels.java:115) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:778) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE
    via by Håvard Rykkelid,
  • When trying to build a small local test project, it failed giving me a ClassNotFoundException: hudson.remoting.Launcher. I eventually figured out the problem: Jetty unpacks the files of the war in a temporary file under my profile folder in windows. Unfortunately I had a norwegian username with the norwegian letter "å", and this was not handled correctly with the remoting-2.52.jar dependency. (The other dependencies seemed to be fine) Changing my username, folder name and a registry key fixed the problem for me. {color:red}This is the output I got when trying to build a small testproject:{color} Started by user anonymous Building in workspace C:\Users\Håvard\.jenkins\jobs\CI\workspace > git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git.exe config remote.origin.url file:///F:/Kurs%20fasit/git # timeout=10 Fetching upstream changes from file:///F:/Kurs fasit/git > git.exe --version # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress file:///F:/Kurs fasit/git +refs/heads/*:refs/remotes/origin/* > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision f9878edebfb6ed3530d875098b72759d69744ef8 (refs/remotes/origin/master) > git.exe config core.sparsecheckout # timeout=10 > git.exe checkout -f f9878edebfb6ed3530d875098b72759d69744ef8 > git.exe rev-list f9878edebfb6ed3530d875098b72759d69744ef8 # timeout=10 Parsing POMs Established TCP socket on 13308 [CI-parent] $ "C:\Program Files\Java\jdk1.8.0_66/bin/java" -cp C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;F:\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;F:\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main F:\apache-maven-3.2.5 C:\Users\H?vard\AppData\Local\Temp\jetty-0.0.0.0-8080-jenkins.war-_jenkins-any-3884816799918590233.dir\webapp\WEB-INF\lib\remoting-2.52.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 13308 Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74) ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to C:\Program Files\Java\jdk1.8.0_66 Established TCP socket on 13310 [CI-parent] $ "C:\Program Files\Java\jre1.8.0_66/bin/java" -cp C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;F:\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;F:\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main F:\apache-maven-3.2.5 C:\Users\H?vard\AppData\Local\Temp\jetty-0.0.0.0-8080-jenkins.war-_jenkins-any-3884816799918590233.dir\webapp\WEB-INF\lib\remoting-2.52.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\Users\Håvard\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 13310 Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74) ERROR: Failed to parse POMs java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:331) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:282) at hudson.slaves.Channels.forProcess(Channels.java:115) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:778) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE
    via by Håvard Rykkelid,
  • Hi, I am running a geb - cucumber-jvm project and at build success I get it as failed Feature: Google Search In order to demonstrate the power of Cucumber and WebDriver combined As a Cucumber instructor I want to walk through a simple google search. @search Scenario: Show you how to search on google # features/search.feature:7 Given I am on the Google search page # search_steps.groovy:7 When I search for "Wikipedia" # search_steps.groovy:16 Then I should see the results page # search_steps.groovy:23 And The first link should be "Wikipedia" # search_steps.groovy:31 1 Scenarios (1 passed) 4 Steps (4 passed) 0m9.848s ERROR: Maven JVM terminated unexpectedly with exit code 0 Finished: FAILURE ------------------------------------------------------------------ May 14, 2014 11:44:00 PM SEVERE hudson.remoting.SynchronousCommandTransport$ReaderThread run I/O error in channel Channel to Maven [C:\Program Files\Java\jdk1.8.0_05/bin/java, -cp, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.5.jar;C:\dev\maven\boot\plexus-classworlds-2.5.1.jar;C:\dev\maven/conf/logging, jenkins.maven3.agent.Maven31Main, C:\dev\maven, C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-2.41.jar, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.5.jar, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.5.jar, 51251] java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82) at hudson.remoting.ChunkedInputStream.readHeader(ChunkedInputStream.java:67) at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:93) at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:33) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) May 14, 2014 11:44:01 PM INFO hudson.model.Run execute GEB-Automation/com.iulian.petcu:payu-geb-automation #18 main build action completed: ABORTED -------------------------------------------------------------------- In Bamboo there was an option "Use Maven's Return Codes" and this fixed the issue. Thanks
    via by Iulian Petcu,
  • [JIRA] [core] (JENKINS-10540) Maven build aborted without cause
    via by gorf...@gmail.com (JIRA),
  • Hi, I am running a geb - cucumber-jvm project and at build success I get it as failed Feature: Google Search In order to demonstrate the power of Cucumber and WebDriver combined As a Cucumber instructor I want to walk through a simple google search. @search Scenario: Show you how to search on google # features/search.feature:7 Given I am on the Google search page # search_steps.groovy:7 When I search for "Wikipedia" # search_steps.groovy:16 Then I should see the results page # search_steps.groovy:23 And The first link should be "Wikipedia" # search_steps.groovy:31 1 Scenarios (1 passed) 4 Steps (4 passed) 0m9.848s ERROR: Maven JVM terminated unexpectedly with exit code 0 Finished: FAILURE ------------------------------------------------------------------ May 14, 2014 11:44:00 PM SEVERE hudson.remoting.SynchronousCommandTransport$ReaderThread run I/O error in channel Channel to Maven [C:\Program Files\Java\jdk1.8.0_05/bin/java, -cp, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.5.jar;C:\dev\maven\boot\plexus-classworlds-2.5.1.jar;C:\dev\maven/conf/logging, jenkins.maven3.agent.Maven31Main, C:\dev\maven, C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-2.41.jar, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.5.jar, C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.5.jar, 51251] java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82) at hudson.remoting.ChunkedInputStream.readHeader(ChunkedInputStream.java:67) at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:93) at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:33) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) May 14, 2014 11:44:01 PM INFO hudson.model.Run execute GEB-Automation/com.iulian.petcu:payu-geb-automation #18 main build action completed: ABORTED -------------------------------------------------------------------- In Bamboo there was an option "Use Maven's Return Codes" and this fixed the issue. Thanks
    via by Iulian Petcu,
  • Retry mongodb connection
    via GitHub by j0hnsmith
    ,
    • java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:331) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:282) at hudson.slaves.Channels.forProcess(Channels.java:115) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:778) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)

    Users with the same issue

    Unknown visitor1 times, last one,
    Nikolay Rybak
    1 times, last one,
    mauritius
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    195 more bugmates