Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40990

Jenkins 2.27 with remoting 3.0 causes Java 5/6 Maven builds to fail

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Seems the switching mechanism does not kick in again. On a local build all locks fine:

      [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
      Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
      	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: ================================================================================
      ERROR: Invalid project setup: Connection reset
      ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
      ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
      ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
      ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
      ERROR: ================================================================================
      Established TCP socket on 34326
      [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
      <===[JENKINS REMOTING CAPACITY]===>channel started
      BUILD Starts
      

      but on a remote node this (same job) fails:

      Parsing POMs
      Established TCP socket on 34109
      maven32-agent.jar already up to date
      maven32-interceptor.jar already up to date
      maven3-interceptor-commons.jar already up to date
      [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
      Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
      	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.io.EOFException: unexpected stream termination
      	at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
      	at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
      	at hudson.slaves.Channels.forProcess(Channels.java:115)
      	at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
      	at hudson.maven.ProcessCache.get(ProcessCache.java:236)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1728)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Finished: FAILURE
      

      Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

      I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).

      With the old remoting (2.62) the caught exception that successfully triggers the switch is as follows:

      ERROR: Caught java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
      java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
      	at hudson.remoting.Channel.call(Channel.java:805)
      	at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297)
      	at hudson.maven.ProcessCache.get(ProcessCache.java:236)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1720)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Caused by: java.lang.ClassFormatError: Failed to load hudson.maven.AbstractMavenProcessFactory$ConfigureOriginalJDK
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:375)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:249)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:332)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      	at ......remote call to Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311](Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:797)
      	... 8 more
      Caused by: java.lang.UnsupportedClassVersionError: hudson/maven/AbstractMavenProcessFactory$ConfigureOriginalJDK : Unsupported major.minor version 51.0
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:249)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:332)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      

        Attachments

          Issue Links

            Activity

            andreasmandel Andreas Mandel created issue -
            andreasmandel Andreas Mandel made changes -
            Field Original Value New Value
            Description After the upgrade from Jenkins 1.515 to Jenkins 1.518 one of our Maven projects failed due to a ClassFormatException:

            {code}
            23:13:30 [JENKINS] Archiving site from /export/build/jenkins-slave/workspace/xxx-nightly-trunk/target/site to /export/build/jenkins/jobs/xxx-nightly-trunk/site
            23:13:37 java.lang.reflect.InvocationTargetException
            23:13:37 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            23:13:37 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            23:13:37 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            23:13:37 at java.lang.reflect.Method.invoke(Method.java:592)
            23:13:37 at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
            23:13:37 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
            23:13:37 at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
            23:13:37 at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
            23:13:37 at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
            23:13:37 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
            23:13:37 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
            23:13:37 at hudson.remoting.Request$2.run(Request.java:326)
            23:13:37 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
            23:13:37 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
            23:13:37 at java.util.concurrent.FutureTask.run(FutureTask.java:123)
            23:13:37 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
            23:13:37 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
            23:13:37 at java.lang.Thread.run(Thread.java:595)
            23:13:37 Caused by: java.lang.ClassFormatError: Failed to load jnr.ffi.mapper.FunctionMapper
            23:13:37 at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:193)
            23:13:37 at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:144)
            23:13:37 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            23:13:37 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            23:13:37 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
            23:13:37 at hudson.os.PosixAPI.jnr(PosixAPI.java:30)
            23:13:37 at hudson.util.IOUtils.mode(IOUtils.java:125)
            23:13:37 at hudson.util.io.TarArchiver.visit(TarArchiver.java:102)
            23:13:37 at hudson.util.DirScanner$Glob.scan(DirScanner.java:133)
            23:13:37 at hudson.FilePath.writeToTar(FilePath.java:1979)
            23:13:37 at hudson.FilePath.copyRecursiveTo(FilePath.java:1905)
            23:13:37 at hudson.FilePath.copyRecursiveTo(FilePath.java:1832)
            23:13:37 at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:82)
            23:13:37 at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:453)
            23:13:37 at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:435)
            23:13:37 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
            23:13:37 at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
            23:13:37 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
            23:13:37 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            23:13:37 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            23:13:37 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
            23:13:37 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
            23:13:37 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
            23:13:37 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
            23:13:37 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
            23:13:37 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
            23:13:37 at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
            23:13:37 ... 18 more
            23:13:37 Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
            23:13:37 at java.lang.ClassLoader.defineClass1(Native Method)
            23:13:37 at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
            23:13:37 at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
            23:13:37 at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:191)
            23:13:37 ... 44 more
            23:13:37 channel stopped
            23:13:38 ERROR: Failed to parse POMs
            {code}

            The issue can be found in the call stack:
            The Jenkins slave calls the Maven launcher and and the Maven launcher does a callback into the Jenkins code to perform some IO operations. For those operations, the jnr-ffi library is used and this has been compiled on the 8th of June under OpenJDK 6 and under Oracle JDK 7:
            https://travis-ci.org/jnr/jnr-ffi
            The pom.xml of the library has no compiler plugin configuration and thus creates code for whatever JDK it runs on (Java 6 class version 50) and I assume that this new version of the library has been pulled in between 1.516 and 1.518 of Jenkins.

            That means this new version of the jnr-ffi library drops Java 5 support for certain Maven builds.
            andreasmandel Andreas Mandel made changes -
            Environment Ubuntu Linux 12.04 LTS
            Slave.jar running under Java 7
            Project: Maven 3.0.4, JDK 5 Update 22
            Slave.jar running under Java 7
            Project: Maven 3.2.2, JDK 6
            andreasmandel Andreas Mandel made changes -
            Description Seems the switching mechanism does not kick in again. On a local build all locks fine:

            {code}
            [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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: ================================================================================
            ERROR: Invalid project setup: Connection reset
            ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
            ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
            ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
            ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
            ERROR: ================================================================================
            Established TCP socket on 34326
            [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
            <===[JENKINS REMOTING CAPACITY]===>channel started
            BUILD Starts
            {code}

            but on a remote node this (same job) fails:

            {code}
            Parsing POMs
            Established TCP socket on 34109
            maven32-agent.jar already up to date
            maven32-interceptor.jar already up to date
            maven3-interceptor-commons.jar already up to date
            [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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.io.EOFException: unexpected stream termination
            at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
            at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
            at hudson.slaves.Channels.forProcess(Channels.java:115)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: FAILURE
            {code}

            Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

            I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).
            andreasmandel Andreas Mandel made changes -
            Link This issue relates to JENKINS-18403 [ JENKINS-18403 ]
            andreasmandel Andreas Mandel made changes -
            Link This issue relates to JENKINS-25272 [ JENKINS-25272 ]
            danielbeck Daniel Beck made changes -
            Link This issue duplicates JENKINS-40810 [ JENKINS-40810 ]
            danielbeck Daniel Beck made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Duplicate [ 3 ]
            andreasmandel Andreas Mandel made changes -
            Resolution Duplicate [ 3 ]
            Status Closed [ 6 ] Reopened [ 4 ]
            Assignee Jesse Glick [ jglick ] Daniel Beck [ danielbeck ]
            danielbeck Daniel Beck made changes -
            Assignee Daniel Beck [ danielbeck ]
            aheritier Arnaud Héritier made changes -
            Link This issue is duplicated by JENKINS-40810 [ JENKINS-40810 ]
            aheritier Arnaud Héritier made changes -
            Link This issue duplicates JENKINS-40810 [ JENKINS-40810 ]
            andreasmandel Andreas Mandel made changes -
            Component/s remoting [ 15489 ]
            Description Seems the switching mechanism does not kick in again. On a local build all locks fine:

            {code}
            [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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: ================================================================================
            ERROR: Invalid project setup: Connection reset
            ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
            ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
            ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
            ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
            ERROR: ================================================================================
            Established TCP socket on 34326
            [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
            <===[JENKINS REMOTING CAPACITY]===>channel started
            BUILD Starts
            {code}

            but on a remote node this (same job) fails:

            {code}
            Parsing POMs
            Established TCP socket on 34109
            maven32-agent.jar already up to date
            maven32-interceptor.jar already up to date
            maven3-interceptor-commons.jar already up to date
            [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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.io.EOFException: unexpected stream termination
            at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
            at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
            at hudson.slaves.Channels.forProcess(Channels.java:115)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: FAILURE
            {code}

            Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

            I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).
            Seems the switching mechanism does not kick in again. On a local build all locks fine:

            {code}
            [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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: ================================================================================
            ERROR: Invalid project setup: Connection reset
            ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
            ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
            ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
            ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
            ERROR: ================================================================================
            Established TCP socket on 34326
            [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
            <===[JENKINS REMOTING CAPACITY]===>channel started
            BUILD Starts
            {code}

            but on a remote node this (same job) fails:

            {code}
            Parsing POMs
            Established TCP socket on 34109
            maven32-agent.jar already up to date
            maven32-interceptor.jar already up to date
            maven3-interceptor-commons.jar already up to date
            [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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.io.EOFException: unexpected stream termination
            at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
            at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
            at hudson.slaves.Channels.forProcess(Channels.java:115)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: FAILURE
            {code}

            Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

            I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).


            With the old remoting (2.62) the caught exception that successfully triggers the switch is as follows:
            {code}
            ERROR: Caught java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            at hudson.remoting.Channel.call(Channel.java:805)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1720)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.lang.ClassFormatError: Failed to load hudson.maven.AbstractMavenProcessFactory$ConfigureOriginalJDK
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:375)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            at ......remote call to Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311](Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            at hudson.remoting.Channel.call(Channel.java:797)
            ... 8 more
            Caused by: java.lang.UnsupportedClassVersionError: hudson/maven/AbstractMavenProcessFactory$ConfigureOriginalJDK : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            {ocde}

            andreasmandel Andreas Mandel made changes -
            Description Seems the switching mechanism does not kick in again. On a local build all locks fine:

            {code}
            [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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: ================================================================================
            ERROR: Invalid project setup: Connection reset
            ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
            ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
            ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
            ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
            ERROR: ================================================================================
            Established TCP socket on 34326
            [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
            <===[JENKINS REMOTING CAPACITY]===>channel started
            BUILD Starts
            {code}

            but on a remote node this (same job) fails:

            {code}
            Parsing POMs
            Established TCP socket on 34109
            maven32-agent.jar already up to date
            maven32-interceptor.jar already up to date
            maven3-interceptor-commons.jar already up to date
            [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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.io.EOFException: unexpected stream termination
            at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
            at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
            at hudson.slaves.Channels.forProcess(Channels.java:115)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: FAILURE
            {code}

            Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

            I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).


            With the old remoting (2.62) the caught exception that successfully triggers the switch is as follows:
            {code}
            ERROR: Caught java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            at hudson.remoting.Channel.call(Channel.java:805)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1720)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.lang.ClassFormatError: Failed to load hudson.maven.AbstractMavenProcessFactory$ConfigureOriginalJDK
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:375)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            at ......remote call to Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311](Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            at hudson.remoting.Channel.call(Channel.java:797)
            ... 8 more
            Caused by: java.lang.UnsupportedClassVersionError: hudson/maven/AbstractMavenProcessFactory$ConfigureOriginalJDK : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            {ocde}

            Seems the switching mechanism does not kick in again. On a local build all locks fine:

            {code}
            [maven-jdk-test] $ /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 41978
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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: ================================================================================
            ERROR: Invalid project setup: Connection reset
            ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6.0 (latest)' not supported to run Maven projects.
            ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
            ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
            ERROR: Retrying with slave Java and setting compile/test properties to point to /export/sbs/jenkins/home/tools/hudson.model.JDK/JDK_1.6.0_latest_.
            ERROR: ================================================================================
            Established TCP socket on 34326
            [maven-jdk-test] $ /export0/sbs/jenkins-runtime-jdk1.8.0/jre/bin/java -cp /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.8.1.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/sbs/jenkins/home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /run/jenkins/war/WEB-INF/lib/remoting-3.2.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.8.1.jar /export/sbs/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar 34326
            <===[JENKINS REMOTING CAPACITY]===>channel started
            BUILD Starts
            {code}

            but on a remote node this (same job) fails:

            {code}
            Parsing POMs
            Established TCP socket on 34109
            maven32-agent.jar already up to date
            maven32-interceptor.jar already up to date
            maven3-interceptor-commons.jar already up to date
            [-maven-jdk-test] $ /export/build/jenkins-localfs/tools/hudson.model.JDK/JDK_1.6.0_latest_/bin/java -cp /export/build/jenkins-localfs/maven32-agent.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/boot/plexus-classworlds-2.5.2.jar:/export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x/conf/logging jenkins.maven3.agent.Maven32Main /export/build/jenkins-localfs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.x /export/build/jenkins-localfs/slave.jar /export/build/jenkins-localfs/maven32-interceptor.jar /export/build/jenkins-localfs/maven3-interceptor-commons.jar 34109
            Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
            at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
            at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
            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.io.EOFException: unexpected stream termination
            at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
            at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
            at hudson.slaves.Channels.forProcess(Channels.java:115)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: FAILURE
            {code}

            Again I'm not sure if this is a remoting or maven plugin issue. I switched back to Jenkins 2.19.3 and all worked fine again.

            I now there is a workaround (Will insert the link asap) but this is manual fragile work on all affected Jobs (which is a lot here).


            With the old remoting (2.62) the caught exception that successfully triggers the switch is as follows:
            {code}
            ERROR: Caught java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            java.io.IOException: Remote call on Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311] failed
            at hudson.remoting.Channel.call(Channel.java:805)
            at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:297)
            at hudson.maven.ProcessCache.get(ProcessCache.java:236)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1720)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.lang.ClassFormatError: Failed to load hudson.maven.AbstractMavenProcessFactory$ConfigureOriginalJDK
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:375)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            at ......remote call to Channel to Maven [/home/jenkins/ws/tools/hudson.model.JDK/jdk1.6.x/bin/java, -cp, /home/jenkins/ws/maven32-agent.jar:/home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x/boot/plexus-classworlds-2.5.2.jar:\home\jenkins\ws\tools\hudson.tasks.Maven_MavenInstallation\maven_3.2.x/conf/logging, jenkins.maven3.agent.Maven32Main, /home/jenkins/ws/tools/hudson.tasks.Maven_MavenInstallation/maven_3.2.x, /home/jenkins/ws/slave.jar, /home/jenkins/ws/maven32-interceptor.jar, /home/jenkins/ws/maven3-interceptor-commons.jar, 41311](Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            at hudson.remoting.Channel.call(Channel.java:797)
            ... 8 more
            Caused by: java.lang.UnsupportedClassVersionError: hudson/maven/AbstractMavenProcessFactory$ConfigureOriginalJDK : Unsupported major.minor version 51.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
            at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
            at java.lang.Thread.run(Thread.java:662)
            {code}

            andreasmandel Andreas Mandel made changes -
            Summary Jenkins 2.32.1 causes Java 5/6 Maven builds to fail Jenkins 2.27 with remoting 3.0 causes Java 5/6 Maven builds to fail
            danielbeck Daniel Beck made changes -
            Labels jdk regression jdk regression remoting3
            oleg_nenashev Oleg Nenashev made changes -
            Component/s remoting [ 15489 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels jdk regression remoting3 java6 jdk regression remoting remoting3
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Arnaud Héritier [ aheritier ]
            aheritier Arnaud Héritier made changes -
            Assignee Arnaud Héritier [ aheritier ]
            aheritier Arnaud Héritier made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Won't Fix [ 2 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                andreasmandel Andreas Mandel
              • Votes:
                7 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: