Reputation: 1083
I'm attempting to set up a new Jenkins slave. The slave is a linux machine and has OpenJDK. java -version
returns
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (rhel-1.13.11.0.el6_7-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
When I run java -jar slave.jar -jnlpUrl http://server:81/computer/buildmachine/slave-agent.jnlp
the slave seems to initially connect and then immediately hits an exception.
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: buildmachine
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://server:81/]
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to server:8080
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP3-connect
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server didn't accept the handshake: Unknown protocol:Protocol:JNLP3-connect
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to server:8080
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP2-connect
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Sep 12, 2016 10:57:11 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run
SEVERE: I/O error in channel channel
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2349)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2818)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:803)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
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)
Sep 12, 2016 10:57:11 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
What's going wrong?
Upvotes: 0
Views: 4211
Reputation: 8164
From https://jenkins.io/blog/2015/04/06/good-bye-java6 :
Your Jenkins master and all the build slaves need to be running on Java7+
Upvotes: 1
Reputation: 1083
The JRE version was not recent enough. Upgraded to a later version of OpenJDK for Java 1.7 and now slave connects correctly.
Upvotes: 2