Docker Jenkins从属JNLP连接终止

Docker Jenkins从属JNLP连接终止,docker,jenkins,haproxy,jnlp,rancher,Docker,Jenkins,Haproxy,Jnlp,Rancher,这里需要帮助 我运行Jenkins(v2.134)作为Rancher管理的docker容器(v1.6.16);我使用haproxy(HA Proxy版本1.6.3 2015/12/25)作为我的负载平衡器。Jenkins JNLP端口配置为50000。haproxy获得了TCP端口转发规则(8081>50000) 我的从机(macmini)位于不同的网络中,位于防火墙后面(该网络可以让我的Jenkins Infra访问)。我正在使用“通过”属性和指定端口的“隧道连接”:8081。端口8081已在

这里需要帮助

我运行Jenkins(v2.134)作为Rancher管理的docker容器(v1.6.16);我使用haproxy(HA Proxy版本1.6.3 2015/12/25)作为我的负载平衡器。Jenkins JNLP端口配置为50000。haproxy获得了TCP端口转发规则(8081>50000)

我的从机(macmini)位于不同的网络中,位于防火墙后面(该网络可以让我的Jenkins Infra访问)。我正在使用“通过”属性和指定端口的“隧道连接”:8081。端口8081已在防火墙中打开

我的Jenkins Java版本是-

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)
Sun JDK "1.8.0_151"
我的从Java版本是-

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)
Sun JDK "1.8.0_151"
这是代理日志-

*INFO: Setting up agent: my-slave-01*
    Sep 26, 2018 2:48:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
    INFO: Jenkins agent is running in headless mode.
    Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
    INFO: Using Remoting version: 3.23
    Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
    WARNING: No Working Directory. Using the legacy JAR Cache location: /Users/jenkins/.jenkins/cache/jars
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Locating server among [http://<My Jenkins URL>/]
    Sep 26, 2018 2:48:51 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
    INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    *INFO: Agent discovery successful*
     *Agent address: <My Jenkins DNS Name>*
     *Agent port:    8081*
     Identity:      b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Handshaking
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to <My Jenkins DNS>:8081
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Trying protocol: JNLP4-connect
    Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Remote identity confirmed: b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
    Sep 26, 2018 2:48:52 PM hudson.remoting.jnlp.Main$CuiListener status
    *INFO: Connected*
    Sep 26, 2018 2:48:54 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
    WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
    Sep 26, 2018 2:49:49 PM hudson.remoting.jnlp.Main$CuiListener status
    *INFO: Terminated*
*信息:设置代理:my-slave-01*
2018年9月26日下午2:48:50 hudson.remoting.jnlp.Main$cui监听器
信息:Jenkins代理正在无头模式下运行。
2018年9月26日下午2:48:50 hudson.remoting.Engine startEngine
信息:使用远程处理版本:3.23
2018年9月26日下午2:48:50 hudson.remoting.Engine startEngine
警告:没有工作目录。使用遗留JAR缓存位置:/Users/jenkins/.jenkins/Cache/jars
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
信息:在[http://]中查找服务器
2018年9月26日下午2:48:51 org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver解析
信息:远程处理服务器接受以下协议:[JNLP4 connect,Ping]
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
*信息:代理发现成功*
*代理地址:*
*代理端口:8081*
标识:b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
信息:握手
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
信息:连接到:8081
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
信息:正在尝试协议:JNLP4连接
2018年9月26日下午2:48:51 hudson.remoting.jnlp.Main$cui监听器状态
信息:远程身份已确认:b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
2018年9月26日下午2:48:52 hudson.remoting.jnlp.Main$cui监听器状态
*信息:已连接*
2018年9月26日下午2:48:54 org.jenkinsci.remoting.util.AnonymousClassWarning
警告:试图(反)序列化匿名类org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2;见:https://jenkins.io/redirect/serialization-of-anonymous-classes/
2018年9月26日下午2:49:49 hudson.remoting.jnlp.Main$culistener状态
*信息:终止*
任何帮助都将不胜感激


有没有办法获取更详细的日志?

我发现了问题;我的负载平衡器(haproxy)默认TCP连接超时(如果没有流量)为50000ms。

但是,Jenkins ping与从属设备(即hudson.slaves.ChannelPinger.ping)的间隔为5分钟(dafault)。


增加负载平衡器超时时间(即>5分钟)解决了此问题。

您是否找到了获取更多详细日志的方法?我还在想办法。在我们的例子中,是ELB的超时设置。这是60秒前的默认值。我将它设置为4000(amx),就这样做了。