Since one of the last updates I cannot connect a slave, which is running a different java version. Jenkins is version 1.558 with Oracle Java 1.7.0_51 and the slave is an x86 box using OpenJDK 1.6.0_27. It is impossible to switch to another Java version on the node. If I try to establish the connection, it fails with this output:

      [04/17/14 09:46:48] [SSH] Opening SSH connection to alpine_2_7_x86:22.
      [04/17/14 09:46:48] [SSH] Authentication successful.
      [04/17/14 09:46:48] [SSH] The remote users environment is:
      HOME='/home/jenkins'
      IFS=' 	
      '
      LOGNAME='jenkins'
      MAIL='/var/mail/jenkins'
      OPTIND='1'
      PATH='/usr/bin:/bin:/usr/sbin:/sbin'
      PPID='429'
      PS1='\w \$ '
      PS2='> '
      PS4='+ '
      PWD='/home/jenkins'
      SHELL='/bin/ash'
      SSH_CLIENT='10.42.23.23 51323 22'
      SSH_CONNECTION='10.42.23.23 51323 10.42.23.192 22'
      USER='jenkins'
      [04/17/14 09:46:48] [SSH] Checking java version of java
      [04/17/14 09:46:48] [SSH] java -version returned 1.6.0_27.
      [04/17/14 09:46:48] [SSH] Starting sftp client.
      [04/17/14 09:46:48] [SSH] SFTP failed. Copying via SCP.
      [04/17/14 09:46:48] [SSH] Copying latest slave.jar...
      hudson.util.IOException2: Could not copy slave.jar into '/home/jenkins/ci' on slave
      	at hudson.plugins.sshslaves.SSHLauncher.copySlaveJarUsingSCP(SSHLauncher.java:1056)
      	at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1015)
      	at hudson.plugins.sshslaves.SSHLauncher.access$300(SSHLauncher.java:126)
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:656)
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	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:744)
      Caused by: java.io.IOException: Error during SCP transfer.
      	at com.trilead.ssh2.SCPClient.put(SCPClient.java:523)
      	at hudson.plugins.sshslaves.SSHLauncher.copySlaveJarUsingSCP(SSHLauncher.java:1054)
      	... 8 more
      Caused by: java.io.IOException: Remote scp terminated unexpectedly.
      	at com.trilead.ssh2.SCPClient.readResponse(SCPClient.java:50)
      	at com.trilead.ssh2.SCPClient.sendBytes(SCPClient.java:140)
      	at com.trilead.ssh2.SCPClient.put(SCPClient.java:519)
      	... 9 more
      [04/17/14 09:46:48] [SSH] Connection closed.
      [04/17/14 09:46:48] Launch failed - cleaning up connection
      

      The connection itself is opened successfully and if I put slave.jar from another node onto this one, it get's deleted during the above steps. But then scp fails!? Any ideas?

      The connection to another node with the same OpenJDK version but x86_64 architecture works without any problems.

          [JENKINS-22651] Could not copy slave.jar into ... on slave

          Yves Schumann added a comment -

          Current setup:

          • Jenkins master (x86-64): 1.565 with Oracle-JDK 1.7.0_60-b19
          • Node1 (x86): OpenJDK 1.7.0_55
          • Node2 (x86): OpenJDK 1.6.0_27

          Yves Schumann added a comment - Current setup: Jenkins master (x86-64): 1.565 with Oracle-JDK 1.7.0_60-b19 Node1 (x86): OpenJDK 1.7.0_55 Node2 (x86): OpenJDK 1.6.0_27

          Yves Schumann added a comment -

          I gave all required information but nothing happens. Is there something on schedule to fix this? Got a bunch of buildnodes which just wasting power and that's not what they should do all the time...

          Yves Schumann added a comment - I gave all required information but nothing happens. Is there something on schedule to fix this? Got a bunch of buildnodes which just wasting power and that's not what they should do all the time...

          Daniel Beck added a comment -

          It is impossible to switch to another Java version on the node

          Why is that?

          Daniel Beck added a comment - It is impossible to switch to another Java version on the node Why is that?

          Yves Schumann added a comment -

          Because there is no java7 available for AlpineLinux 2.7 which is running on these nodes. AlpineLinux up to 2.x is based on uCLibc and openjdk7 did not compile on these system and the version 2.7 ist the current LTS release. The current development line and next release (3.x) has switched from uCLibc to musl-libc and for these systems java7 is available. But as I said, v2.7 is the current stable release and I need to build packages for this release.

          Yves Schumann added a comment - Because there is no java7 available for AlpineLinux 2.7 which is running on these nodes. AlpineLinux up to 2.x is based on uCLibc and openjdk7 did not compile on these system and the version 2.7 ist the current LTS release. The current development line and next release (3.x) has switched from uCLibc to musl-libc and for these systems java7 is available. But as I said, v2.7 is the current stable release and I need to build packages for this release.

          Daniel Beck added a comment -

          According to the log, both SFTP and SCP fail. Are you able to use these from e.g. the command line to connect to that host? What kind of SSH server is on running on that machine?

          Daniel Beck added a comment - According to the log, both SFTP and SCP fail. Are you able to use these from e.g. the command line to connect to that host? What kind of SSH server is on running on that machine?

          Yves Schumann added a comment -

          Connecting to these nodes using SSH works as expected. I'm using this every day for administration a.s.o. Used SSH version is

          OpenSSH_6.4p1-hpn14v1, OpenSSL 1.0.1h 5 Jun 2014
          

          As I wrote on the initial text: If I put slave.jar from another machine on the node by hand, it get's deleted during the copy step. So the SSH connection itself must work, otherwise the slave.jar which I copied by hand won't get removed!?

          Yves Schumann added a comment - Connecting to these nodes using SSH works as expected. I'm using this every day for administration a.s.o. Used SSH version is OpenSSH_6.4p1-hpn14v1, OpenSSL 1.0.1h 5 Jun 2014 As I wrote on the initial text: If I put slave.jar from another machine on the node by hand, it get's deleted during the copy step. So the SSH connection itself must work, otherwise the slave.jar which I copied by hand won't get removed!?

          Daniel Beck added a comment -

          To clarify, are you able to use SCP or SFTP to that host? That SSH (i.e. a shell) works I have no doubt, even Jenkins manages that.

          Daniel Beck added a comment - To clarify, are you able to use SCP or SFTP to that host? That SSH (i.e. a shell) works I have no doubt, even Jenkins manages that.

          Yves Schumann added a comment - - edited

          You made my day!

          That was the input which leads to the right direction. Did not even know that there is such a difference in between ssh and scp. You're completely right, plain ssh works but scp not:

          jenkins@flieger:~$ scp -i .ssh/builder07 tmp/foobar.txt alpine_2_7_x86:~/
          Couldn't open /dev/null: Permission denied
          lost connection
          jenkins@flieger:~$
          

          After setting proper permissions on /dev/null, jenkins is able to connect to the node again. Thank you very much for the push into the right direction.

          Have to investigate now, why the permission on /dev/null was set wrong. But that's a different story...

          Yves Schumann added a comment - - edited You made my day! That was the input which leads to the right direction. Did not even know that there is such a difference in between ssh and scp. You're completely right, plain ssh works but scp not: jenkins@flieger:~$ scp -i .ssh/builder07 tmp/foobar.txt alpine_2_7_x86:~/ Couldn't open /dev/ null : Permission denied lost connection jenkins@flieger:~$ After setting proper permissions on /dev/null, jenkins is able to connect to the node again. Thank you very much for the push into the right direction. Have to investigate now, why the permission on /dev/null was set wrong. But that's a different story...

          Daniel Beck added a comment -

          Resolving as not a defect: Server configuration issue.

          Daniel Beck added a comment - Resolving as not a defect: Server configuration issue.

          Shiva B added a comment -

          My 2 cents, even if Remote root directory lacks proper write permission (for the remote user) such problems will surface.

          Shiva B added a comment - My 2 cents, even if Remote root directory lacks proper write permission (for the remote user) such problems will surface.

            Unassigned Unassigned
            swf Yves Schumann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: