I recently inherited a Jenkins-driven Java project where the primary developer just upped and quit. He had deployed the Jenkins WAR to a Tomcat instance on a virtual server, and that is what was considered to be the "build server".
This build server had a slave configured for building and deploying to myserver.example.com
, another virtual server. Over the weekend, the systems staff retired the physical server that the myserver.example.com
virtual lived on, producing the following exception for any Jenkins job configured to deploy to that slave:
When I click on the "See log for more details" link I see the following console output:
[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.
This makes sense, since the slave (the myserver.example.com
virtual) is offline. However, having no real previous experience with Jenkins, I'm not sure of what the proper steps are for configuring the Jenkins master to build/deploy these jobs to a new slave, and how to set up the new slave. For instance, do I need to install anything on the new slave, or do any kind of setup/config? Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…