本文介绍了Windows上的Jenkins从属代理连接失败,连接超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上连接Jenkins从属代理失败,连接超时.

Connecting Jenkins slave agent on windows failed with connection timeout.

环境:Windows Server 2003 R2Java6

Environment:Windows server 2003 R2Java6

Master:Linux从站:Windows

Master: LinuxSlave: Windows

我尝试将其同时运行为jnlp和java -jar cmd,但始终失败.

I tried to run it as jnlp and also java -jar cmd but it fails consistently.

INFO: Connecting to [ec2-machine_url]:4317
5 (retrying:2)
java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at hudson.remoting.Engine.connect(Engine.java:304)
        at hudson.remoting.Engine.run(Engine.java:193)

推荐答案

您提供的信息不多,但是从错误消息中,您似乎暗示您的构建计算机正在Amazon EC2上运行.

You don't give much information, but from the error message, you seem to be suggesting that your build machine is running on Amazon EC2.

在这种情况下,您的EC2实例的安全组可能不允许从Jenkins主服务器到构建计算机上端口4317的TCP连接.

In that case, it's likely that your security group for the EC2 instance isn't allowing TCP connections from your Jenkins master server to port 4317 on the build machine.

检查安全组的配置是否正确,如果使用的是JNLP客户端,还可以确保Jenkins主服务器侦听固定端口,以简化防火墙配置:

Check that your security group is configured correctly and, if you're using the JNLP client, you can also ensure that the Jenkins master server listens on a fixed port, to make firewall configuration easier:

管理Jenkins>配置全局安全性>启用安全性> JNLP代理的TCP端口:固定

Manage Jenkins > Configure Global Security > Enable security > TCP port for JNLP agents: Fixed

这篇关于Windows上的Jenkins从属代理连接失败,连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 14:29