詹金斯奴隶未能在 Windows 上握手

Dan*_*nyT 5 networking windows windows-server-2008 jenkins

我有一台 win2k8 机器用作我们的 CI 主服务器(Jenkins)

我有各种其他服务器作为奴隶运行

主机正在侦听端口 2000 上的从机连接

  • SlaveA -可以在 2000 上连接到 master
  • SlaveB -无法连接到 2000 上的 master
  • SlaveB - 可以连接到另一个端口上的 master
  • SlaveA - 只有 2000 个可用作为开放端口
  • SlaveB - 似乎没有将端口 2000 用于任何事情,并且没有任何防火墙规则阻止它的使用,如 netstat 所示

SlaveA 和 SlaveB 的行为在几台不同的机器上是通用的。即我有 3 个不相关的服务器(不同的主机,不同的网络)无法连接,而有几个可以连接。

连接失败时从代理的输出是:

03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://myserver:8080/]
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to myserver:2000
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
03-Oct-2011 15:08:23 hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Connection reset
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at hudson.remoting.Engine.readLine(Engine.java:279)
        at hudson.remoting.Engine.run(Engine.java:211)
Run Code Online (Sandbox Code Playgroud)

因为 telnet 工作网络人们声称无罪

因为该应用程序在不同的端口上运行,所以我无法从软件方面获得太多输入

我不知道接下来要尝试什么来帮助调试这种情况:(

任何建议都非常感谢。

更新:似乎正在建立从站和主站之间的连接,因为在主日志上我得到以下输出:

INFO: Accepted connection #13 from /MY.SLAVE.IP.ADDRESS:58545
Oct 3, 2011 5:38:09 PM hudson.TcpSlaveAgentListener$ConnectionHandler run
WARNING: Connection #13 failed
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.DataInputStream.readUnsignedShort(Unknown Source)
    at java.io.DataInputStream.readUTF(Unknown Source)
    at java.io.DataInputStream.readUTF(Unknown Source)
    at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:178)
Run Code Online (Sandbox Code Playgroud)

但是,我不知道为什么会重置连接,也不知道该去哪里找 :(

Ita*_*not 2

当我自己尝试连接 w2k8 jenkins 从属时,我自己就遇到了这个确切的错误。

\n\n

我整理了最终导致 Jenkins 从站成功连接到主站的事项列表:

\n\n
1. Make sure that Java 1.8 is installed on the server.\n2. Download Jenkins from:\nhttps://jenkins.io/content/thank-you-downloading-windows-installer/#stable\nand install it.\n3. Make sure that the user windows user is a member of the local administrative account on the server.\n4. Once Jenkins is installed, open services, find Jenkins service, right click and properties, click the \xe2\x80\x9cLog on\xe2\x80\x9d tab and make sure that \xe2\x80\x9cThis account\xe2\x80\x9d is set with the windows user you chose, save and restart the service.\n5. Open \xe2\x80\x9cLocal security Policy\xe2\x80\x9d on the server, on the left panel, under \xe2\x80\x9cSecurity settins\xe2\x80\x9d -> \xe2\x80\x9cLocal Policies\xe2\x80\x9d -> \xe2\x80\x9cUser rights assignments\xe2\x80\x9d -> find policy: \xe2\x80\x9cLog on as a batch job\xe2\x80\x9d, open it and make sure that the local administrative group is added there.\n6. Repeat the same steps for the policy \xe2\x80\x9cLog on as a service\xe2\x80\x9d.\n7. Open \xe2\x80\x9cregedit\xe2\x80\x9d, find the following keys and repeat the steps on both of them:\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Wow6432Node\\CLSID\\{72C24DD5-D70A-438B-8A42-98424B88AFB8}\nHKEY_CLASSES_ROOT\\CLSID\\{76A64158-CB41-11D1-8B02-00600806D9B6}\na. Right click the key and choose permissions.\nb. Click \xe2\x80\x9cAdvanced\xe2\x80\x9d.\nc. In the line of \xe2\x80\x9cOwner\xe2\x80\x9d, click \xe2\x80\x9cchange\xe2\x80\x9d.\nd. Click \xe2\x80\x9cLocations\xe2\x80\x9d and choose the first line (this computer).\nThen, in the lower box write \xe2\x80\x9cAdministrators\xe2\x80\x9d and click \xe2\x80\x9cCheck Names\xe2\x80\x9d, then click ok and apply.\ne. Double click the Administrators line and choose under Basic permissions \xe2\x80\x9cFull Control\xe2\x80\x9d and click ok and apply.\nf. In the line of \xe2\x80\x9cOwner\xe2\x80\x9d, click \xe2\x80\x9cchange\xe2\x80\x9d.\ng. Click \xe2\x80\x9cLocations\xe2\x80\x9d and choose the first line (this computer).\nThen, in the lower box write \xe2\x80\x9cNT Service\\trusted\xe2\x80\x9d and click \xe2\x80\x9cCheck Names\xe2\x80\x9d, then click ok and apply.\n8. Restart the server.\n9. When the server is back up, open the browser and browse to:\nhttp://JENKINS_IP:8080 and log in.\n10. Then on the left panel click Jenkins -> Manage server -> Manage nodes.\n11. On the left panel, click \xe2\x80\x9cNew Node\xe2\x80\x9d, name it and choose \xe2\x80\x9cPermanent agent\xe2\x80\x9d.\nThen in the node settings:\n12. Set # of executors.\n13. Set Remote root directory c:\\jenkins.\n14. Set: \na. a label as the name of server.\nb. Launch method: choose \xe2\x80\x9cLet Jenkins controlthis Windows slave as a windows service\xe2\x80\x9d.\nc. Use javab as the \xe2\x80\x9cAdministrator\xe2\x80\x9d (set user and password).\nd. Run service as: choose \xe2\x80\x9cUse administrator account given above\xe2\x80\x9d.\ne. Click save.\n15. Once the node appears in the list of nodes, click it and choose connect node and allow 3 minutes to make the connection, even if you get an error, ignore it and it will eventually connect to the node.\nAt this point the new node is ready to accept jobs.\n
Run Code Online (Sandbox Code Playgroud)\n\n

我希望这有帮助。

\n