Jenkins代理不断重复断开/重新连接

时间:2017-01-17 10:36:43

标签: jenkins agent

我有一个jenkins主服务器。我刚刚创建了一个新的jenkins代理,并通过Java Web Start在ubuntu主机中启动它。代理连接成功,但过了一段时间后它会显示"终止",然后在一段时间之后再说它"已连接"。并且它始终如此重复。

我甚至没有尝试运行构建/作业

有趣的是,这个ubuntu代理和这个jnlp以及这个java web start在过去几周一直运行良好 - 甚至直到几个小时前。现在它突然开始断断续续并重复连接,就像这样。

JNLP agent connected from /116.68.205.58
<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 3.2
This is a Unix agent
ERROR: Connection terminated
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:2353)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
    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)
ERROR: Failed to install restarter
hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
    at hudson.remoting.Request.abort(Request.java:307)
    at hudson.remoting.Channel.terminate(Channel.java:888)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:92)
    at ......remote call to Channel to /116.68.205.58(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
    at hudson.remoting.Request.call(Request.java:172)
    at hudson.remoting.Channel.call(Channel.java:821)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:52)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:33)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:39)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:36)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: 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:2353)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
    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)
JNLP agent connected from /116.68.205.58
<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 3.2
This is a Unix agent

1 个答案:

答案 0 :(得分:0)

检查jenkins slave日志中是否存在可能的问题。另外,Jenkins节点配置页面下的可用性设置如何?

  

詹金斯&gt;&gt;管理Jenkins&gt;&gt;管理节点&gt;&gt;您的节点&gt;&gt;配置

我最近有一个具有相同症状的Windows奴隶,并从

更改了可用性
  

&#34;在需要时将此代理联机,在闲置时使其脱机&#34;

  

&#34;尽可能保持此代理在线状态&#34;

它解决了我的问题,但你可能遇到了与我的问题不同的问题。所以我建议先查看从属日志。如果可以,请在此处发布日志片段以供进一步分析。