Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins slave jobs failing on "Unexpected termination of channel"

Tags:

jenkins

I am currently seeing a set of errors across my builds.

Is this expected behaviour if you loose Jenkins (say to a box crash, or a kill -9)?

Or is there something worse going on (like a bad network connection)?

The stack and error is:

hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)         at $Proxy175.join(Unknown Source)   at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:861)     at hudson.Launcher$ProcStarter.join(Launcher.java:345)     at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)         at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)         at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)         at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)         at hudson.model.Build$RunnerImpl.build(Build.java:178)  at hudson.model.Build$RunnerImpl.doRun(Build.java:139)     at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)         at hudson.model.Run.run(Run.java:1410)  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)     at hudson.model.ResourceController.execute(ResourceController.java:88)         at hudson.model.Executor.run(Executor.java:238) Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel   at hudson.remoting.Request.abort(Request.java:273)     at hudson.remoting.Channel.terminate(Channel.java:732)     at hudson.remoting.Channel$ReaderThread.run(Channel.java:1157) Caused by: java.io.IOException: Unexpected termination of the channel  at hudson.remoting.Channel$ReaderThread.run(Channel.java:1133) Caused by: java.io.EOFException    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)         at hudson.remoting.Channel$ReaderThread.run(Channel.java:1127) 
like image 893
Clark Wright Avatar asked Apr 03 '12 17:04

Clark Wright


People also ask

Why Jenkins node is offline?

Jenkins monitors each attached node for disk space, free temp space, free swap, clock time/sync and response time. A node is taken offline if any of these values go outside the configured threshold.

What is Jenkins slave used for?

Jenkins Slave It hears requests from the Jenkins Master instance. Slaves can run on a variety of operating systems. The job of a Slave is to do as they are told to, which involves executing build jobs dispatched by the Master.

How do you check if Jenkins slave is running?

Basic usage. Visit a url like http:``//myslave:3141 to see whether a slave is running and how much memory it is using. Configure the port used by clicking Manage Jenkins on the dashboard.


2 Answers

You'll see that error if the Jenkins master loses connectivity with the slave. It could be due to any of the three issues you listed above:

  • Manually killing the slave process

  • The slave server becoming unavailable

  • A network problem between the master and the slave

like image 131
gareth_bowles Avatar answered Sep 19 '22 15:09

gareth_bowles


I resolved it by a simple restart of the master Jenkins server.

like image 27
schoenk Avatar answered Sep 16 '22 15:09

schoenk