5

When i try to start my jenkins slave, the slave exists with error:

[04/14/17 17:22:06] [SSH] Checking java version of java
[04/14/17 17:22:06] [SSH] java -version returned 1.7.0_121.
[04/14/17 17:22:06] [SSH] Starting sftp client.
[04/14/17 17:22:06] [SSH] Copying latest slave.jar...
[04/14/17 17:22:06] [SSH] Copied 719,269 bytes.
Expanded the channel window size to 4MB
[04/14/17 17:22:06] [SSH] Starting slave process: cd "/home/jenkins" && java     -jar slave.jar -text
<===[JENKINS REMOTING CAPACITY]===><===[HUDSON TRANSMISSION BEGINS]===channel started
Slave JVM has not reported exit code. Is it still running?
[04/14/17 17:22:11] Launch failed - cleaning up connection
ERROR: Connection terminated
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2625)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3100)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:854)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:350)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
[04/14/17 17:22:11] [SSH] Connection closed.

Is there anyway to fix this? I've googled, and googled, and googled, but can't find anything to solve this problem.

Youri
  • 495
  • 1
  • 4
  • 18

1 Answers1

7

I haven't faced the same issue, but I guess it may be linked to this: https://issues.jenkins-ci.org/browse/JENKINS-27624

(It is in case your Jenkins version is 2.54 - minimum java version should be 8)

Olia
  • 815
  • 4
  • 16
  • Thanks Olia. This was indeed the problem. Jenkins should implement a nice error message when having older Java versions :(. – Youri Apr 18 '17 at 06:37
  • You are welcome, @Youri :) I agree with you, since very often it is quite difficult to find out the root of the problem with Jenkins. I came to conclusion that the best thing in such a situation is to check https://issues.jenkins-ci.org for any suspected problems in each bad case – Olia Apr 18 '17 at 09:32
  • Boy, we just ran into this ourselves. I would have loved an explicit error. The very first line of that output makes you think that the Java version check worked without issue: "Checking java version of java"... – Taytay Jul 07 '17 at 18:14
  • Same issue here, just updated to the latest Jenkins version and all the linux slaves failing. As Taytay said, you think the version check would be doing something. – James MV Jul 20 '17 at 11:53