Starting slave agents via SSH fails, Ubuntu 12.04

2,040 views
Skip to first unread message

Zach La Celle

unread,
Oct 6, 2015, 4:30:55 PM10/6/15
to Jenkins Users
When I try to start a slave agent on my Ubuntu 12.04 machine (the master is running 14.04), I get the following error:

[10/06/15 16:26:42] [SSH] Starting slave process: cd "/home/build/jenkins-workspace" && java  -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
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: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:745)
Caused by: java.io.IOException: Remote call on Ubuntu1204-amd64-1 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:976)
... 7 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:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:113)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1611)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1516)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1349)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
at ......remote call to Ubuntu1204-amd64-1(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)
... 10 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:643)
at java.lang.ClassLoader.defineClass(ClassLoader.java:489)
at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:338)
at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:113)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1611)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1516)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1349)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
[10/06/15 16:26:47] Launch failed - cleaning up connection
ERROR: Connection terminated
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
[10/06/15 16:26:47] [SSH] Connection closed.
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2332)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2801)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:801)
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)..

Any idea what might cause this problem?

Mark Waite

unread,
Oct 6, 2015, 4:34:26 PM10/6/15
to Jenkins Users
The remote machine is probably configured to run a java version which is too old.  For example, you may have Java 6 installed on the Ubuntu 12.04 machine when you need to install Java 7.

If Java 7 is installed on the Ubuntu 12 machine, then you may need to configure the Jenkins slave to run with that java instead of the default Java on the Ubuntu 12 machine.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e5fb00c7-6aed-4236-88c9-e547543e2794%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zach La Celle

unread,
Oct 6, 2015, 4:45:12 PM10/6/15
to Jenkins Users
OK, switching everything to Java 7 seems to have done the trick.  Thank you.

孟广毅

unread,
Dec 2, 2015, 9:37:55 AM12/2/15
to Jenkins Users
yes ,it is  java version is too old on the failed slave ,  you can  see which java used  befor " Starting slave process: cd "/home/build/jenkins-workspace" && java  -jar slave.jar",so you  can modify the JavaPath in the slave config page.

在 2015年10月7日星期三 UTC+8上午4:34:26,Mark Waite写道:
Reply all
Reply to author
Forward
0 new messages