jenkins代理与java相关

dwbf0jvd  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(267)

我们队经历过Jenkins奴隶特工断线的问题。这种问题在 Package 烘烤机中经常发生。
在从机运行过程中,任何一点都会断开。错误信息是:

07:31:11  Cannot contact EC2 (ThomsonReutersEC2) - PackerAgent (i-05b6a0894cdfcd6fd): hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@11a64065:EC2 (ThomsonReutersEC2) - PackerAgent (i-05b6a0894cdfcd6fd)": Remote call on EC2 (ThomsonReutersEC2) - PackerAgent (i-05b6a0894cdfcd6fd) failed. The channel is closing down or has closed down
08:08:32  Could not connect to EC2 (ThomsonReutersEC2) - PackerAgent (i-05b6a0894cdfcd6fd) to send interrupt signal to process
[Pipeline] }
08:08:32  EC2 (ThomsonReutersEC2) - PackerAgent (i-05b6a0894cdfcd6fd) was marked offline: Connection was broken: java.io.EOFException
08:08:32    at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2759)
08:08:32    at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3234)
08:08:32    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:913)
08:08:32    at java.io.ObjectInputStream.<init>(ObjectInputStream.java:375)
08:08:32    at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
08:08:32    at hudson.remoting.Command.readFrom(Command.java:142)
08:08:32    at hudson.remoting.Command.readFrom(Command.java:128)
08:08:32    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
08:08:32    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
08:08:32  Caused: java.io.IOException: Unexpected termination of the channel
08:08:32    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)

我们做了一些改进,使jenkins从代理使用相同的java版本,比如java8作为jenkins主代理。这种方法确实减少了断开连接问题的机会,但问题仍然存在。
下面是java启动jenkins远程代理的连接消息,到目前为止我们还没有找到更改远程代理版本的帮助

INFO: Launching remoting agent (via Trilead SSH2 Connection):  java -Xdebug -Xmx2048m  -jar /tmp/remoting.jar -workDir /var/jenkins
<===[JENKINS REMOTING CAPACITY]===>Remoting version: 4.3
This is a Unix agent
Evacuated stdout
Agent successfully connected and online

我们一直在监控有这个问题的盒子,到目前为止,没有太多的日志可以告诉错误和没有内存或cpu的高使用率发现。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题