我最近继承了一个由 Jenkins 驱动的 Java 项目,该项目的主要开发人员刚刚升级并退出。他已将 Jenkins WAR 部署到虚拟服务器上的 Tomcat 实例上,这就是所谓的“构建服务器”。
该构建服务器配置了一个从属服务器,用于构建和部署到myserver.example.com
另一个虚拟服务器。上周末,系统人员停用了myserver.example.com
虚拟机所在的物理服务器,为配置为部署到该从站的任何 Jenkins 作业产生了以下异常:
当我单击“查看日志以获取更多详细信息”链接时,我看到以下控制台输出:
[03/18/13 08:13:31] [SSH] Opening SSH connection to myserver.example.com:22.
java.io.IOException: There was a problem while connecting to myserver.example.com:22
at com.trilead.ssh2.Connection.connect(Connection.java:755)
at com.trilead.ssh2.Connection.connect(Connection.java:546)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:650)
at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:283)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.NoRouteToHostException: No route to host
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 com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:342)
at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:450)
at com.trilead.ssh2.Connection.connect(Connection.java:699)
... 9 more
[03/18/13 08:13:34] [SSH] Connection closed.
这是有道理的,因为从属(myserver.example.com
虚拟)处于离线状态。但是,以前没有真正的 Jenkins 经验,我不确定配置 Jenkins 主服务器以将这些作业构建/部署到新从属设备的正确步骤,以及如何设置新从属设备。例如,我是否需要在新的从属设备上安装任何东西,或者进行任何类型的设置/配置?提前致谢!