java.net.SocketException: Connection reset

Jenkins JIRA | Stefan Strobel | 2 years ago
  1. 0

    Hey community, after the last upgrade (I guess it was from Jenkins 1.551) to Jenkins 1.584 we encounter serious problems with our legacy Java5 Maven builds. When Jenkins calls the Maven plugin (right after "Parsing poms") the build crashes with the following stacktrace: {noformat} Parsing POMs Modules changed, recalculating dependency graph [my-maven-project] $ /var/apphome/162_cipbld/jdk_1.5_latest/bin/java -Xms64m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=256m -cp /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.5.jar:/var/apphome/162_cipbld/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/apphome/162_cipbld/apache-maven-3.0.4 /var/apphome/162_cipbld/162_cipbld-0/webapps/jenkins/WEB-INF/lib/remoting-2.46.jar /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.5.jar /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 58566 Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:135) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:64) [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties file path '/path/to/my.properties' [EnvInject] - Variables injected successfully. ERROR: Failed to parse POMs java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at java.io.FilterInputStream.read(FilterInputStream.java:116) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:198) at hudson.remoting.Channel.<init>(Channel.java:418) at hudson.remoting.Channel.<init>(Channel.java:397) at hudson.remoting.Channel.<init>(Channel.java:393) at hudson.remoting.Channel.<init>(Channel.java:382) at hudson.remoting.Channel.<init>(Channel.java:374) at hudson.remoting.Channel.<init>(Channel.java:366) at hudson.slaves.Channels$1.<init>(Channels.java:70) at hudson.slaves.Channels.forProcess(Channels.java:70) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:759) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) at hudson.model.Run.execute(Run.java:1754) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Email was triggered for: Failure - Any {noformat} I figured out that the only difference between succeeding and failing builds was the version of remoting.jar. The new Jenkins version ships with version 2.46. When I stopped Tomcat and exchanged the remoting-2.46.jar with remoting-2.44.jar the builds work again. Could you please investigate this as it is crucial to us that the Java5 builds are still stable to build? Thanks!

    Jenkins JIRA | 2 years ago | Stefan Strobel
    java.net.SocketException: Connection reset
  2. 0

    Hey community, after the last upgrade (I guess it was from Jenkins 1.551) to Jenkins 1.584 we encounter serious problems with our legacy Java5 Maven builds. When Jenkins calls the Maven plugin (right after "Parsing poms") the build crashes with the following stacktrace: {noformat} Parsing POMs Modules changed, recalculating dependency graph [my-maven-project] $ /var/apphome/162_cipbld/jdk_1.5_latest/bin/java -Xms64m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=256m -cp /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.5.jar:/var/apphome/162_cipbld/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/apphome/162_cipbld/apache-maven-3.0.4 /var/apphome/162_cipbld/162_cipbld-0/webapps/jenkins/WEB-INF/lib/remoting-2.46.jar /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.5.jar /var/apphome/162_cipbld/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 58566 Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:135) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:64) [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties file path '/path/to/my.properties' [EnvInject] - Variables injected successfully. ERROR: Failed to parse POMs java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at java.io.FilterInputStream.read(FilterInputStream.java:116) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:198) at hudson.remoting.Channel.<init>(Channel.java:418) at hudson.remoting.Channel.<init>(Channel.java:397) at hudson.remoting.Channel.<init>(Channel.java:393) at hudson.remoting.Channel.<init>(Channel.java:382) at hudson.remoting.Channel.<init>(Channel.java:374) at hudson.remoting.Channel.<init>(Channel.java:366) at hudson.slaves.Channels$1.<init>(Channels.java:70) at hudson.slaves.Channels.forProcess(Channels.java:70) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:759) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) at hudson.model.Run.execute(Run.java:1754) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Email was triggered for: Failure - Any {noformat} I figured out that the only difference between succeeding and failing builds was the version of remoting.jar. The new Jenkins version ships with version 2.46. When I stopped Tomcat and exchanged the remoting-2.46.jar with remoting-2.44.jar the builds work again. Could you please investigate this as it is crucial to us that the Java5 builds are still stable to build? Thanks!

    Jenkins JIRA | 2 years ago | Stefan Strobel
    java.net.SocketException: Connection reset
  3. 0

    Recently, i've upgraded the Jenkins from 1.532 to 1.547, but after upgradation, Maven build alone fails with the following reason, if i restart the Jenkins, build is getting succeeded but it fails after some time (say fails after 5 hours) and also some of the image is not visible (attached screenshot) /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.4.jar:/eas/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /eas/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/3.0.4 /tmp/jetty-0.0.0.0-8080-jenkins.war--any-/webapp/WEB-INF/lib/remoting-2.33.jar /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.4.jar /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar 51932 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.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:135) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:64) ERROR: Failed to parse POMs java.net.SocketException: Connection reset 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.ClassicCommandTransport.create(ClassicCommandTransport.java:133) at hudson.remoting.Channel.<init>(Channel.java:406) at hudson.remoting.Channel.<init>(Channel.java:402) at hudson.remoting.Channel.<init>(Channel.java:363) at hudson.remoting.Channel.<init>(Channel.java:359) at hudson.remoting.Channel.<init>(Channel.java:355) at hudson.slaves.Channels$1.<init>(Channels.java:71) at hudson.slaves.Channels.forProcess(Channels.java:71) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:253) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:749) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566) at hudson.model.Run.execute(Run.java:1678) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Archiving artifacts Finished: FAILURE

    Jenkins JIRA | 3 years ago | Senthil Kumar Chandran
    java.net.SocketException: Connection reset
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The issue described in JENKINS-18403 appears again in Jenkins 1.565.3 (works fine in 1.565.2) Running a Maven build with an 1.5 JDK fails. The automatic JDK switch implemented to fix JENKINS-18403 does not seem to kick in: {code} Parsing POMs [my-job-trunk] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/jdk-1.5.0.22/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.x/boot/plexus-classworlds-2.5.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.x/conf/logging jenkins.maven3.agent.Maven31Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.x /run/jenkins/war/WEB-INF/lib/remoting-2.46.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 41235 Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) at jenkins.maven3.agent.Maven31Main.main(Maven31Main.java:138) at jenkins.maven3.agent.Maven31Main.main(Maven31Main.java:67) ERROR: Failed to parse POMs java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:196) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:198) at hudson.remoting.Channel.<init>(Channel.java:418) at hudson.remoting.Channel.<init>(Channel.java:397) at hudson.remoting.Channel.<init>(Channel.java:393) at hudson.remoting.Channel.<init>(Channel.java:382) at hudson.remoting.Channel.<init>(Channel.java:374) at hudson.remoting.Channel.<init>(Channel.java:366) at hudson.slaves.Channels$1.<init>(Channels.java:70) at hudson.slaves.Channels.forProcess(Channels.java:70) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:755) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1706) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) [description-setter] Description set: Skipping sonar analysis due to bad build status FAILURE {code}

    Jenkins JIRA | 2 years ago | Andreas Mandel
    java.net.SocketException: Connection reset
  6. 0

    Recently, i've upgraded the Jenkins from 1.532 to 1.547, but after upgradation, Maven build alone fails with the following reason, if i restart the Jenkins, build is getting succeeded but it fails after some time (say fails after 5 hours) and also some of the image is not visible (attached screenshot) /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.4.jar:/eas/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /eas/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/3.0.4 /tmp/jetty-0.0.0.0-8080-jenkins.war--any-/webapp/WEB-INF/lib/remoting-2.33.jar /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.4.jar /eas/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar 51932 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.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:135) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:64) ERROR: Failed to parse POMs java.net.SocketException: Connection reset 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.ClassicCommandTransport.create(ClassicCommandTransport.java:133) at hudson.remoting.Channel.<init>(Channel.java:406) at hudson.remoting.Channel.<init>(Channel.java:402) at hudson.remoting.Channel.<init>(Channel.java:363) at hudson.remoting.Channel.<init>(Channel.java:359) at hudson.remoting.Channel.<init>(Channel.java:355) at hudson.slaves.Channels$1.<init>(Channels.java:71) at hudson.slaves.Channels.forProcess(Channels.java:71) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:253) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:749) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566) at hudson.model.Run.execute(Run.java:1678) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Archiving artifacts Finished: FAILURE

    Jenkins JIRA | 3 years ago | Senthil Kumar Chandran
    java.net.SocketException: Connection reset

  1. Andreas Häber 4 times, last 2 months ago
  2. sriharshakiran 1 times, last 7 months ago
14 unregistered visitors
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
    BufferedInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:168)
    2. java.io.FilterInputStream.read(FilterInputStream.java:116)
    3. java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    4. java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    4 frames
  3. Hudson :: Remoting Layer
    Channel.<init>
    1. hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:198)
    2. hudson.remoting.Channel.<init>(Channel.java:418)
    3. hudson.remoting.Channel.<init>(Channel.java:397)
    4. hudson.remoting.Channel.<init>(Channel.java:393)
    5. hudson.remoting.Channel.<init>(Channel.java:382)
    6. hudson.remoting.Channel.<init>(Channel.java:374)
    7. hudson.remoting.Channel.<init>(Channel.java:366)
    7 frames
  4. Hudson
    Channels.forProcess
    1. hudson.slaves.Channels$1.<init>(Channels.java:70)
    2. hudson.slaves.Channels.forProcess(Channels.java:70)
    2 frames
  5. Hudson Maven Embedder
    MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun
    1. hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280)
    2. hudson.maven.ProcessCache.get(ProcessCache.java:235)
    3. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:759)
    3 frames
  6. Hudson
    Run.execute
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
    2. hudson.model.Run.execute(Run.java:1754)
    2 frames
  7. Hudson Maven Embedder
    MavenModuleSetBuild.run
    1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    1 frame
  8. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:89)
    2. hudson.model.Executor.run(Executor.java:240)
    2 frames