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

Slaves turns to "Dead" state after connecting to remote machine

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core, remoting
    • Linux 2.6.27.42-0.1-default #1 SMP 2010-01-06 16:07:25 +0100 x86_64 x86_64 x86_64 GNU/Linux
      Distributor ID: SUSE LINUX
      Description: SUSE Linux Enterprise Desktop 11 (x86_64)
      Release: 11
      Codename: n/a

      Hi,

      I'm trying to run a slave on a remote computer, but it isn't working. For some reason the slave fails after the link has been established between the master and remote nodes.

      The error message looks like this:
      java.lang.NoClassDefFoundError: hudson/model/Run$RunExecution
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getConstructor0(Class.java:2699)
      at java.lang.Class.getConstructor(Class.java:1657)
      at hudson.model.AbstractProject.newBuild(AbstractProject.java:944)
      at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1159)
      at hudson.model.AbstractProject.createExecutable(AbstractProject.java:129)
      at hudson.model.Executor.run(Executor.java:214)
      Caused by: java.lang.ClassNotFoundException: hudson.model.Run$RunExecution
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 8 more

      Any idea about what might be causing this malfunctioning?

      Best Regards,
      Carlos

        1. error.jpg
          error.jpg
          111 kB
        2. slave-configuration.png
          slave-configuration.png
          48 kB
        3. slave-startup.txt
          2 kB

          [JENKINS-15199] Slaves turns to "Dead" state after connecting to remote machine

          Brian Murrell added a comment - - edited

          Still no resolution to this issue?

          It would be really nice to fix this issue for all of the people who are going to be upgrading and run into this issue and have to apply the workaround in the previous comment.

          Even a mention in https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2013-01-04 of the issue and work-around would be useful instead of people wasting time as I did trying to figure out what the problem is.

          Brian Murrell added a comment - - edited Still no resolution to this issue? It would be really nice to fix this issue for all of the people who are going to be upgrading and run into this issue and have to apply the workaround in the previous comment. Even a mention in https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2013-01-04 of the issue and work-around would be useful instead of people wasting time as I did trying to figure out what the problem is.

          I also get the error message in 1.498:
          Thread has died

          java.lang.NullPointerException
          at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:220)
          at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:66)
          at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1266)
          at hudson.model.AbstractProject.createExecutable(AbstractProject.java:138)
          at hudson.model.Executor.run(Executor.java:211)

          I can reproduce by starting a slave on a node (works) and then start a second slave on the same node (fails).
          I'm using SSH.

          Magnus Larsson added a comment - I also get the error message in 1.498: Thread has died java.lang.NullPointerException at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:220) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:66) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1266) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:138) at hudson.model.Executor.run(Executor.java:211) I can reproduce by starting a slave on a node (works) and then start a second slave on the same node (fails). I'm using SSH.

          Additional data:
          Slave successfully connected and online
          ERROR: Connection terminated
          java.io.IOException: Unexpected termination of the channel
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
          Caused by: java.io.EOFException
          at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
          at hudson.remoting.Command.readFrom(Command.java:92)
          at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:59)
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
          [01/16/13 09:05:06] [SSH] Connection closed.
          ERROR: [01/16/13 09:05:06] slave agent was terminated
          java.io.IOException: Unexpected termination of the channel
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
          Caused by: java.io.EOFException
          at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
          at hudson.remoting.Command.readFrom(Command.java:92)
          at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:59)
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

          Magnus Larsson added a comment - Additional data: Slave successfully connected and online ERROR: Connection terminated java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Command.readFrom(Command.java:92) at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:59) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) [01/16/13 09:05:06] [SSH] Connection closed. ERROR: [01/16/13 09:05:06] slave agent was terminated java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Command.readFrom(Command.java:92) at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:59) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

          Magnus Larsson added a comment - - edited

          It seems to work for me now.
          My "SSH Slave Plugin" was out-of-date (v2.1). I upgraded to 2.2 and my Dead slave nodes went away. I'm now running v1.499 with no problem.

          Magnus Larsson added a comment - - edited It seems to work for me now. My "SSH Slave Plugin" was out-of-date (v2.1). I upgraded to 2.2 and my Dead slave nodes went away. I'm now running v1.499 with no problem.

          taksan added a comment - - edited

          We are having this problem as well on v1.499. I already installed the latest ssh slave plugin, but it didn't work.
          At least, the workaround proposed by Aerts (removing matrix jobs from the queue and restarting the slave thread) worked.

          taksan added a comment - - edited We are having this problem as well on v1.499. I already installed the latest ssh slave plugin, but it didn't work. At least, the workaround proposed by Aerts (removing matrix jobs from the queue and restarting the slave thread) worked.

          I have the same issue without matrix jobs in the queue, and the slave is a Windows machine started through JNLP.

          Olivier Chédru added a comment - I have the same issue without matrix jobs in the queue, and the slave is a Windows machine started through JNLP.

          David Gang added a comment -

          I have the same problem with jenkins 1.513 and slave plugin 2.17

          David Gang added a comment - I have the same problem with jenkins 1.513 and slave plugin 2.17

          Oleg Nenashev added a comment -

          Most probably, the issue has been fixed by the classloading fix (see JENKINS-19453).
          Please re-open if it appears on newest versions

          Oleg Nenashev added a comment - Most probably, the issue has been fixed by the classloading fix (see JENKINS-19453 ). Please re-open if it appears on newest versions

          sam sa added a comment -

          hi carlos did you find a solution to jenkins pages refreshing every few seconds ?

          sam sa added a comment - hi carlos did you find a solution to jenkins pages refreshing every few seconds ?

          Carlos André added a comment -

          Hi Sam,

          I haven't been using Jenkins for a couple of years, but as Oleg mentioned before, it is most likely solved by the classloading fix (see JENKINS-19453).

          Carlos André added a comment - Hi Sam, I haven't been using Jenkins for a couple of years, but as Oleg mentioned before, it is most likely solved by the classloading fix (see JENKINS-19453 ).

            kohsuke Kohsuke Kawaguchi
            carlosandre Carlos André
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: