-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Ubuntu 10.04
Hudson 1.381
Hudson does not restart properly when calling "/etc/init.d/hudson restart". When it calls "do_start" java hasn't let go of port 8080 so the restart fails. The solution is to sleep for 2 seconds between stopping and starting:
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
sleep 2 # wait for java to release the port !!
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;