views:

95

answers:

2

I've been having an issue with Hudson on windows.

Whenever I update Hudson or a plugin I get the option to restart when no jobs are running.
If I click this button Hudson hangs and doesn't restart. I've tried restarting the Hudson service but this doesn't help, so end up having to reboot the box to bring Hudson back online.

I've just updated to the most recent version, but didn't click the restart button and it's now vanished.

Is there a correct way to restart Hudson on windows?

Cheers

Tom

+1  A: 

If the Slave node has the slave.jar used as a windows service, that service is defined as "Automatic".
It means it will try to contact the master periodically if the connection has been severed.

You shouldn't click on anything on the server side (in the Node definition) to restart said Node: it should be back online automatically.

VonC
Thanks for your answer VonC. I'm not actually running any slaves. Just hudson as a master. So do you have any ideas why it hangs when I click the restart button?
Toggo
@Toggo: oh ok. Peter's answer might be more relevant then.
VonC
+3  A: 

I have a this problem once in a while too. For some reason the Hudson server does not shut down completely and the server that starts up, can not use the port. To fix that problem, I run `netstat -n -o'. This way I can find out the process ID that holds the port and kill that app through taskmanager. Now I can restart the service and Hudson comes up fine.

For the last few weeks I had a similar problem. The description says, that it restarts the app, when no processes are running. I missed out on one job that was hold in the build queue and because of a faulty configuration never actually build, therefore preventing Hudson from restarting.

After all of your jobs are finished and your server does not restart. Just visit the restart page again http://server:port/restart and try to restart again. If that doesn't work stop the service and start it again.

Peter Schuetze
Thanks for your suggestion Peter! I'm going to run he update at the end of the day and I'll give it a go if it hangs.
Toggo
Amazingly, since asking this question, I've updated Hudson and its plugins and not had an issue with the restart. I can see the logic in what you're saying Peter so will mark your answer as the accepted one. Thanks for your help!
Toggo