tags:

views:

49

answers:

1

I have bug troubles (re)starting Hudson slaves on Windows XP machines that are located on a different campus (not so close to the hudson server, still the network speed is decent and reliable - do get ~400-800 KB/s on test).

Hudson server is running on OS X under Tomcat.

hudson-slave.err.log:

Exception in thread "main" java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at hudson.remoting.Launcher.runAsTcpServer(Launcher.java:303)
at hudson.remoting.Launcher.run(Launcher.java:202)
at hudson.remoting.Launcher.main(Launcher.java:167)

hudson-slave.wrapper.log:

2010-10-11 12:22:18 - Started 3116
2010-10-12 00:52:11 - Starting javaw.exe -Xrs -jar "d:\.hudson\slave.jar" -tcp         d:\.hudson\port.txt
2010-10-12 00:52:12 - Started 3312
2010-10-12 02:12:05 - Starting javaw.exe -Xrs -jar "d:\.hudson\slave.jar" -tcp     d:\.hudson\port.txt
2010-10-12 02:12:05 - Started 1332
2010-10-12 02:36:05 - Starting javaw.exe -Xrs -jar "d:\.hudson\slave.jar" -tcp d:\.hudson\port.txt
2010-10-12 02:36:05 - Started 2972
2010-10-12 03:56:05 - Starting javaw.exe -Xrs -jar "d:\.hudson\slave.jar" -tcp d:\.hudson\port.txt
2010-10-12 03:56:05 - Started 632

Event log:

Event Type: Warning
Event Source:   hudsonslave-d__.hudson
Event Category: None
Event ID:   0
Date:       10/12/2010
Time:       3:56:36 AM
User:       N/A
Computer:   GWATANAB370-XP
Description:
Child process [632 - javaw.exe -Xrs -jar "d:\.hudson\slave.jar" -tcp d:\.hudson\port.txt] terminated with 1

Another strange thing is that I see that slave.jar file is always incomplete. The one from the server is 131131 bytes long but the one downloaded to the client is always less than this.

On the node monitor the last step is Copying slave.jar and stays like this forever.

In case it wasn't obvious the node is configured to be started with Let Hudson control this Windows slave as a Windows service option. This seams to me the most reliable method that should be safe even if hudson server or client is rebooted.

A: 

I have good experience with installing a slave as a service and let the remote machine handle the service startup and shutdown. Master and slave find each other regardless of what server gets restarted. Works reliable and I don't need to supply a Administrator password to control the slave.

As you probably figured out, you need to update the slave together with the master. But I don't remember if I always did this. Meanwhile we switched the slaves to unix and I use the ssh feature. The slaves come only up when needed. So I can't really run a test with this.

Peter Schuetze

related questions