Java – Jenkins slave goes offline during the build process

Jenkins slaves were offline during construction How do I solve this problem? I saw many related problems on so and Jenkins problems, but no one solved them

My configuration:

Jenkins version 1.651 1. Zuul version 2.1 1. Dev393 runs and builds in parallel with one Jenkins master (Ubuntu) and two slaves (Ubuntu), each with 16GB of memory

Jenkins' master, devstack and two nodepool slave stations are within the same IP range

When a slave completes its construction, I am facing a problem. Then the Java processes in the two slaves are killed, so the other slaves are offline

I found this problem by listing the processes running in the slave, and observed that when one slave completes its build and the other slave is still running the build, the java process is killed in both slaves at the same time

I had this problem before, which was solved by switching from open JDK to Oracle JDK Today's slaves are using Oracle Java 1.8 0_ 111, but now we have the same problem as oracle-java8

Build log:

01:42:07 Slave went offline during the build
01:42:07 ERROR: Connection was broken: java.io.IOException: Unexpected termination of the channel
01:42:07    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
01:42:07 Caused by: java.io.EOFException
01:42:07    at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2351)
01:42:07    at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2820)
01:42:07    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
01:42:07    at java.io.ObjectInputStream.<init>(ObjectInputStream.java:302)
01:42:07    at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
01:42:07    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(    AbstractSynchronousByteArrayCommandTransport.java:34)
01:42:07    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
01:42:07 
01:42:07 Build step 'Execute shell' marked build as failure

Solution

Slaves are offline because

>The job running on it is consuming more RAM or no memory than it has

– if this is the case, try to have fewer executing programs in the slave or more CPU / RAM in the node

>The slave cleanup process may be running, or some orphan processes may run later, resulting in connection interruption

– clean up processes, or kill isolated processes, which consume memory

>SSH key between master and slave may change

– send the SSH key to the slave station through SCP again and touch it again

Please try again and read the following article for more help

> https://wiki.jenkins-ci.org/display/JENKINS/Remoting +issue > Jenkins slave jobs failing on “Unexpected termination of channel”

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>