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

slave error on java.lang.NoClassDefFoundError: hudson.remoting.ProxyOutputStream$Flush

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • ssh-slaves-plugin
    • None
    • IBM AIX 5.3 & jdk 1.6

      The slave crash with this error:
      I open a topic but not found solution: http://n4.nabble.com/slave-error-on-aix-td387272.html#a387272

      FATAL: command execution failed
      hudson.util.IOException2: Failed to join the process
      	at hudson.Proc$RemoteProc.join(Proc.java:311)
      	at hudson.Launcher$ProcStarter.join(Launcher.java:275)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:583)
      	at hudson.model.Build$RunnerImpl.build(Build.java:165)
      	at hudson.model.Build$RunnerImpl.doRun(Build.java:133)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      	at hudson.model.Run.run(Run.java:1179)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: hudson.remoting.ProxyOutputStream$Flush
      	at hudson.remoting.Channel$1.adapt(Channel.java:580)
      	at hudson.remoting.Channel$1.adapt(Channel.java:575)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.Proc$RemoteProc.join(Proc.java:303)
      	... 12 more
      Caused by: java.lang.NoClassDefFoundError: hudson.remoting.ProxyOutputStream$Flush
      	at java.lang.J9VMInternals.verifyImpl(Native Method)
      	at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
      	at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
      	at hudson.remoting.RemoteOutputStream.readObject(RemoteOutputStream.java:90)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      	at java.lang.reflect.Method.invoke(Method.java:600)
      	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:986)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1963)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:168)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:88)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:150)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:736)
      Caused by: java.lang.ClassNotFoundException: hudson.remoting.ProxyOutputStream$Flush
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
      	... 27 more
      Notifying upstream projects of job completion
      

          [JENKINS-5149] slave error on java.lang.NoClassDefFoundError: hudson.remoting.ProxyOutputStream$Flush

          The easiest explanation for this is that the slave.jar is out of sync (the Flush class in question was added in 2007, so if the slave.jar is older than that, you'll see this problem.) Then I quickly realized that you've used the ssh-slaves plugin, which always copies up-to-date slave.jar.

          Then I thought maybe the problem is a failure to initialize a class, but then again I quickly realized that the root cause is ClassNotFoundException, so that can't be the case.

          The system has successfully loaded RemoteOutputStream class as that's showing up in the stack trace, so it's using the right classloader, too.

          So I have no clue why it's failing to find the class in question. I need to run this in the debugger and step execute into why URLClassLoader doesn't find the class in question.

          Kohsuke Kawaguchi added a comment - The easiest explanation for this is that the slave.jar is out of sync (the Flush class in question was added in 2007, so if the slave.jar is older than that, you'll see this problem.) Then I quickly realized that you've used the ssh-slaves plugin, which always copies up-to-date slave.jar. Then I thought maybe the problem is a failure to initialize a class, but then again I quickly realized that the root cause is ClassNotFoundException, so that can't be the case. The system has successfully loaded RemoteOutputStream class as that's showing up in the stack trace, so it's using the right classloader, too. So I have no clue why it's failing to find the class in question. I need to run this in the debugger and step execute into why URLClassLoader doesn't find the class in question.

          btosabre added a comment -

          This issue looks very similar and has some work-arounds proposed:
          http://issues.jenkins-ci.org/browse/JENKINS-4656

          btosabre added a comment - This issue looks very similar and has some work-arounds proposed: http://issues.jenkins-ci.org/browse/JENKINS-4656

          erwan_q added a comment -

          thanks for your help:
          I use different FS slave location for all my slaves and now this solve all my unix slaves issues

          erwan_q added a comment - thanks for your help: I use different FS slave location for all my slaves and now this solve all my unix slaves issues

            stephenconnolly Stephen Connolly
            erwan_q erwan_q
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: