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

Unable to launch agent using SSH

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: ssh-slaves-plugin
    • Environment:
      Jenkins ver. 1.630
         SSH Slaves plugin 1.9

      Also tried with latest version of SSH Slaves plugin 1.10 (not working)
    • Similar Issues:

      Description

      Unable to launch any agent machines using SSH

      [09/21/15 13:34:40] [SSH] Checking java version of java
      [09/21/15 13:34:41] [SSH] java -version returned 1.6.0_22.
      [09/21/15 13:34:41] [SSH] Starting sftp client.
      [09/21/15 13:34:42] [SSH] Copying latest slave.jar...
      [09/21/15 13:34:52] [SSH] Copied 489,023 bytes.
      Expanded the channel window size to 4MB
      [09/21/15 13:34:52] [SSH] Starting slave process: cd "/home/sdmagg" && java -jar slave.jar
      <===[JENKINS REMOTING CAPACITY]===>

      hudson.util.IOException2: Slave JVM has not reported exit code. Is it still running?
      	at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:953)
      	at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:133)
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:711)
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: java.io.IOException: Remote call on sdapdevjsctrl failed
      	at hudson.remoting.Channel.call(Channel.java:786)
      	at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:493)
      	at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:366)
      	at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:945)
      	... 8 more
      Caused by: java.lang.ClassFormatError: Failed to load hudson.slaves.SlaveComputer$SlaveVersion
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:340)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:264)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:113)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1592)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:185)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:99)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:679)
      	at ......remote call to sdapdevjsctrl(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
      	at hudson.remoting.Channel.call(Channel.java:778)
      	... 11 more
      Caused by: java.lang.UnsupportedClassVersionError: hudson/slaves/SlaveComputer$SlaveVersion : Unsupported major.minor version 51.0
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:480)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:338)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:264)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:113)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1592)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:185)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:99)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:679)
      [09/21/15 13:34:57] Launch failed - cleaning up connection
      ERROR: Connection terminated
      [09/21/15 13:34:57] [SSH] Connection closed.
      ha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=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$PeekInputStream.readFully(ObjectInputStream.java:2323)
      	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2792)
      	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:799)
      	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
      	at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
      	at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
      
      

        Attachments

          Activity

          Hide
          shahjapan Japan Shah added a comment -

          I found the alternate solution for this issue:
          Download and extract java1.7.0_79 on slave machine's home directory

          Goto Jenkins:
          Node => Manage => launch method => JavaPath
          set to: /home/

          {user}

          /jdk1.7.0_79/bin/java

          This resolved the issue temporarily.

          Show
          shahjapan Japan Shah added a comment - I found the alternate solution for this issue: Download and extract java1.7.0_79 on slave machine's home directory Goto Jenkins: Node => Manage => launch method => JavaPath set to: /home/ {user} /jdk1.7.0_79/bin/java This resolved the issue temporarily.
          Hide
          thedj Derk-Jan Hartman added a comment - - edited

          Yes, this is because your default java on your node is running java 1.6. The error could be handled a bit better however.. I mean "[09/21/15 13:34:41] [SSH] java -version returned 1.6.0_22." it's already checking the version. Might as well do something with it

          I also installed Java 7 locally on that machine and switched javaPath (an option that is under the advanced button btw). I wanted to keep the actual jobs on that single node compiling with Java 6, specifically because it's doing checks on backwards compatibility.

          Show
          thedj Derk-Jan Hartman added a comment - - edited Yes, this is because your default java on your node is running java 1.6. The error could be handled a bit better however.. I mean " [09/21/15 13:34:41] [SSH] java -version returned 1.6.0_22." it's already checking the version. Might as well do something with it I also installed Java 7 locally on that machine and switched javaPath (an option that is under the advanced button btw). I wanted to keep the actual jobs on that single node compiling with Java 6, specifically because it's doing checks on backwards compatibility.
          Hide
          xipmox Vince Murphy added a comment - - edited

          Also observed in jenkins 1.625.3 + 1.10. Confirming that upgrading to java 7 fixed it.

          This is lame. Just add a comment to the plugin description that java7 is required on the slaves.

          Show
          xipmox Vince Murphy added a comment - - edited Also observed in jenkins 1.625.3 + 1.10. Confirming that upgrading to java 7 fixed it. This is lame. Just add a comment to the plugin description that java7 is required on the slaves.
          Hide
          timothy_clarke Timothy Clarke added a comment - - edited

          Some feedback / defence / update
          I don't think this is a generic slave issue, not just SSH (but SSH could handle it better)
          If I change a slave to JNLP I get the same issue

          To all those who have posted, and to the maintainer, after looking a little further. I think this issue should be closed / rejected
          Ref https://jenkins.io/blog/2015/04/06/good-bye-java6/

          Some detail is in JENKINS-29412 and linked off that http://shahjapan.blogspot.co.uk/2015/09/jenkins-unable-to-launch-slave-machine.html pointing to the blog above

          Show
          timothy_clarke Timothy Clarke added a comment - - edited Some feedback / defence / update I don't think this is a generic slave issue, not just SSH (but SSH could handle it better) If I change a slave to JNLP I get the same issue To all those who have posted, and to the maintainer, after looking a little further. I think this issue should be closed / rejected Ref https://jenkins.io/blog/2015/04/06/good-bye-java6/ Some detail is in JENKINS-29412 and linked off that http://shahjapan.blogspot.co.uk/2015/09/jenkins-unable-to-launch-slave-machine.html pointing to the blog above
          Hide
          ema_h Emanuel Hategan added a comment -

          There's now a PR that fixes this issue:
          https://github.com/jenkinsci/ssh-slaves-plugin/pull/40

          Show
          ema_h Emanuel Hategan added a comment - There's now a PR that fixes this issue: https://github.com/jenkinsci/ssh-slaves-plugin/pull/40
          Hide
          kenorb kenorb added a comment - - edited

          To change the Java version to use higher, run: update-alternatives --config java

          Switching to java-8-openjdk-amd64 solved the problem. 

          Related: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

          Show
          kenorb kenorb added a comment - - edited To change the Java version to use higher, run:  update-alternatives --config java Switching to java-8-openjdk-amd64 solved the problem.  Related: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

            People

            • Assignee:
              ifernandezcalvo Ivan Fernandez Calvo
              Reporter:
              shahjapan Japan Shah
            • Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: