• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • ssh-slaves-plugin
    • Jenkins ver. 1.630
         SSH Slaves plugin 1.9

      Also tried with latest version of SSH Slaves plugin 1.10 (not working)

      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)
      
      

          [JENKINS-30561] Unable to launch agent using SSH

          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.

          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.

          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.

          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.

          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.

          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.

          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

          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

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

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

          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

          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

          iulian iulian added a comment -

           Hi,
           
           I have updated Jenkins to the latest version (Jenkins ver. 2.164.1) and Selenium Grid version is: 3.12.0. Java varsion on master (where run the hub) is: openjdk version "1.8.0_191", on the slave is: java version "1.8.0_191" and SSH Slave plugin version 1.11. When the nod is trying to connect to slave is throw this error:

           

          [04/02/19 09:29:28] [SSH] Starting sftp client. [04/02/19 09:29:28] [SSH] Copying latest slave.jar... [04/02/19 09:29:28] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 09:29:28] [SSH] Starting slave process: cd "/var/jenkins" && /usr/lib/jvm/jdk1.8.0_191/bin/java Xmx128m -Xms128m -jar slave.jar <===[JENKINS REMOTING CAPACITY]===>channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 9:29:30 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see:

          https://jenkins.io/redirect/serialization-of-anonymous-classes/

          hudson.util.IOException2: Slave JVM has not reported exit code. Is it still running? at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Failed to copy /var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.12.0.jar to /var/jenkins/selenium-server-standalone-3.12.0.jar at hudson.FilePath.copyTo(FilePath.java:2191) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:76) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:23) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3041) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)

           

          With SSH Slave plugin version 1.29 is throwing a different error:

           

          [04/02/19 09:33:42] [SSH] Starting sftp client. [04/02/19 09:33:42] [SSH] Copying latest remoting.jar... [04/02/19 09:33:42] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 09:33:42] [SSH] Starting agent process: cd "/var/jenkins" && /usr/lib/jvm/jdk1.8.0_191/bin/java Xmx128m -Xms128m -jar remoting.jar -workDir /var/jenkins Apr 02, 2019 9:33:43 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using /var/jenkins/remoting as a remoting work directory Both error and output logs will be printed to /var/jenkins/remoting <===[JENKINS REMOTING CAPACITY]===>channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 9:33:45 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see:

          https://jenkins.io/redirect/serialization-of-anonymous-classes/

          Slave JVM has not reported exit code. Is it still running? [04/02/19 09:33:50] Launch failed - cleaning up connection [04/02/19 09:33:50] [SSH] Connection closed. ERROR: Connection terminated java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862) at java.io.ObjectInputStream.(ObjectInputStream.java:358) at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:49) at hudson.remoting.Command.readFrom(Command.java:140) at hudson.remoting.Command.readFrom(Command.java:126) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63) Caused: java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)

           

          Any ideas?

          Note: On the other server the node connect to that slave successfully (Jenkins ver. 2.22 Selenium grid: 3.12.0 and SSH Slave 1.11)

          Thank you!

          iulian iulian added a comment -  Hi,    I have updated Jenkins to the latest version (Jenkins ver. 2.164.1) and Selenium Grid version is: 3.12.0. Java varsion on master (where run the hub) is: openjdk version "1.8.0_191", on the slave is: java version "1.8.0_191" and SSH Slave plugin version 1.11. When the nod is trying to connect to slave is throw this error:   [04/02/19 09:29:28] [SSH] Starting sftp client. [04/02/19 09:29:28] [SSH] Copying latest slave.jar... [04/02/19 09:29:28] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 09:29:28] [SSH] Starting slave process: cd "/var/jenkins" && /usr/lib/jvm/jdk1.8.0_191/bin/java Xmx128m -Xms128m -jar slave.jar <=== [JENKINS REMOTING CAPACITY] ===>channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 9:29:30 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ hudson.util.IOException2: Slave JVM has not reported exit code. Is it still running? at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Failed to copy /var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.12.0.jar to /var/jenkins/selenium-server-standalone-3.12.0.jar at hudson.FilePath.copyTo(FilePath.java:2191) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:76) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:23) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3041) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)   With SSH Slave plugin version 1.29 is throwing a different error:   [04/02/19 09:33:42] [SSH] Starting sftp client. [04/02/19 09:33:42] [SSH] Copying latest remoting.jar... [04/02/19 09:33:42] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 09:33:42] [SSH] Starting agent process: cd "/var/jenkins" && /usr/lib/jvm/jdk1.8.0_191/bin/java Xmx128m -Xms128m -jar remoting.jar -workDir /var/jenkins Apr 02, 2019 9:33:43 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using /var/jenkins/remoting as a remoting work directory Both error and output logs will be printed to /var/jenkins/remoting <=== [JENKINS REMOTING CAPACITY] ===>channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 9:33:45 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ Slave JVM has not reported exit code. Is it still running? [04/02/19 09:33:50] Launch failed - cleaning up connection [04/02/19 09:33:50] [SSH] Connection closed. ERROR: Connection terminated java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862) at java.io.ObjectInputStream.(ObjectInputStream.java:358) at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:49) at hudson.remoting.Command.readFrom(Command.java:140) at hudson.remoting.Command.readFrom(Command.java:126) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63) Caused: java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)   Any ideas? Note: On the other server the node connect to that slave successfully (Jenkins ver. 2.22 Selenium grid: 3.12.0 and SSH Slave 1.11) Thank you!

            ifernandezcalvo Ivan Fernandez Calvo
            shahjapan Japan Shah
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: