将JNLP从机连接到Jenkins主机时出现UnresolvedAddressException

mbjcgjjk  于 2023-04-05  发布在  Jenkins
关注(0)|答案(1)|浏览(252)

我在我的OKE集群(单节点集群)中创建了一个jenkins master。我想尝试使用Jenkins kubernetes插件并连接jnlp-slaves. Following are my kuberenetes cloud configurations.
Jenkins tunnel and URL info
我使用的Jenkins版本是Jenkins 2.319.3。当我开始构建时,一个pod正在我的集群中创建,并给出了一个错误。
以下是创建的pod的日志。

Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: kube-agent-s8tw6
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Mar 17, 2022 5:49:10 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.11.2
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/jenkins/agent/remoting as a remoting work directory
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/jenkins/agent/remoting
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://138.2.75.190:30000/]
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: http://138.2.75.190
  Agent port:    50000
  Identity:      5b:f2:ef:be:d1:98:05:91:83:3d:a5:61:b6:1b:93:e5
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to http://138.2.75.190:50000
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: null
java.nio.channels.UnresolvedAddressException
    at java.base/sun.nio.ch.Net.checkAddress(Unknown Source)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
    at java.base/java.nio.channels.SocketChannel.open(Unknown Source)
    at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:206)
    at hudson.remoting.Engine.connectTcp(Engine.java:880)
    at hudson.remoting.Engine.innerRun(Engine.java:757)
    at hudson.remoting.Engine.run(Engine.java:540)

我检查了端口和我禁用防火墙在我的节点。我仍然得到的错误。有人可以帮助我解决这个问题吗?

lrpiutwd

lrpiutwd1#

我遇到了同样的错误并解决了。
您在Jenkins隧道中添加了“http://”前缀,这导致了错误。只需在Jenkins Kubernetes配置页面中将隧道地址更改为“138.2.75.190:50000”。

相关问题