Domanda

I upgraded my Jenkins version and after that I lost SSH connection to my slave nodes. Launching the slave right after key authentication I'm having following error:

[02/28/14 14:20:02] [SSH] Checking java version of java
Couldn't figure out the Java version of java
bash: java: command not found

[02/28/14 14:20:02] [SSH] Checking java version of /usr/bin/java
Couldn't figure out the Java version of /usr/bin/java
bash: /usr/bin/java: No such file or directory

[02/28/14 14:20:02] [SSH] Checking java version of /usr/java/default/bin/java
Couldn't figure out the Java version of /usr/java/default/bin/java
bash: /usr/java/default/bin/java: No such file or directory

[02/28/14 14:20:02] [SSH] Checking java version of /usr/java/latest/bin/java
Couldn't figure out the Java version of /usr/java/latest/bin/java
bash: /usr/java/latest/bin/java: No such file or directory

[02/28/14 14:20:02] [SSH] Checking java version of /usr/local/bin/java
Couldn't figure out the Java version of /usr/local/bin/java
bash: /usr/local/bin/java: No such file or directory

[02/28/14 14:20:02] [SSH] Checking java version of /usr/local/java/bin/java
Couldn't figure out the Java version of /usr/local/java/bin/java
bash: /usr/local/java/bin/java: No such file or directory

[02/28/14 14:20:02] [SSH] Checking java version of         /users/mdspadm/tools/hudson_tmp/jdk/bin/java
Couldn't figure out the Java version of /users/mdspadm/tools/hudson_tmp/jdk/bin/java
bash: /users/mdspadm/tools/hudson_tmp/jdk/bin/java: No such file or directory

[02/28/14 14:20:03] [SSH] Checking java version of     /users/apache/tools/hudson/usr/lib/jvm/jre-1.5.0-ibm//bin/java
[02/28/14 14:20:03] [SSH] /users/apache/tools/hudson/usr/lib/jvm/jre-1.5.0-ibm//bin/java -version returned 1.5.0.
[02/28/14 14:20:03] [SSH] Starting sftp client.
[02/28/14 14:20:03] [SSH] Copying latest slave.jar...
[02/28/14 14:20:04] [SSH] Copied 346,845 bytes.
Expanded the channel window size to 4MB
[02/28/14 14:20:04] [SSH] Starting slave process: cd "/users/mdspadm/tools/hudson_tmp"   && /users/apache/tools/hudson/usr/lib/jvm/jre-1.5.0-ibm//bin/java  -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
java.io.IOException: Remote call on tunnel_mspvq330 failed
at hudson.remoting.Channel.call(Channel.java:731)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:449)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:345)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:812)
at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:598)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassFormatError: Failed to load 

It is a java problem, but my current configuration was OK before my upgrade. Any idea how to fix this please.

Updates: Starting Jenkins 1.608+ Jenkins moved to Java7; which has broken the connectivity to launch slave nodes via SSH as jenkins ssh-slave plugin still tries to connect using lower version of Java.

References: http://jenkins-ci.org/content/good-bye-java6

È stato utile?

Soluzione

If you have upgraded Jenkins from a very old version i would recommand updating Java,

Also other problem maybe the System/Envronment variables for Java bin path missing or incorrect?

Java has also introduced new security features in it's latest update so watch out for any extra authentication that maybe required.

and also I found this. Its old but it may help

EDIT

Following comments from @shahjapan below I have updated this answer to also contain the link to his page HERE

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top