gpt4 book ai didi

docker - Jenkins Slave JNLP 连接被终止

转载 作者:行者123 更新时间:2023-12-02 06:13:37 24 4
gpt4 key购买 nike

在这里寻求帮助!

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

我的从机(macmini)位于不同的网络中并且位于防火墙后面(该网络可以到达我的 Jenkins 基础设施)。我正在使用“隧道连接通过”属性和指定端口“:8081”。端口 8081 已在防火墙中打开。

我的 Jenkins Java 版本是 -

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)

我的 Slave Java 版本是 -

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*

任何帮助将不胜感激。

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

最佳答案

我发现了问题;我的负载均衡器(haproxy)的 TCP 连接默认超时(如果没有流量)为 50000 毫秒。 https://cbonte.github.io/haproxy-dconv/configuration-1.5.html

但是,Jenkins 与从站(即 hudson.slaves.ChannelPinger.pingInterval)的 ping 间隔为 5 分钟(默认)。 https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties

增加负载均衡器超时,即 > 5 分钟解决了问题。

关于docker - Jenkins Slave JNLP 连接被终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52526332/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com