Do you provide any program to restart the galaxy server? Currently, I just Ctrl+z to exit the run.sh, but some time it kept the port binding, so I have to restart the computer to release the port to start the server. If I work remotely, this put me into trouble.
Hello, Start up your server as a daemon ( depending on your platform ). Perhaps something like: to start server: sh run.sh --daemon to stop server: sh run.sh --stop-daemon Greg Von Kuster Galaxy Development Team very wrote:
Do you provide any program to restart the galaxy server? Currently, I just Ctrl+z to exit the run.sh, but some time it kept the port binding, so I have to restart the computer to release the port to start the server. If I work remotely, this put me into trouble.
------------------------------------------------------------------------
_______________________________________________ galaxy-user mailing list galaxy-user@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-user
On Fri, Oct 24, 2008 at 8:21 PM, very <riververy@yahoo.com> wrote:
Do you provide any program to restart the galaxy server? Currently, I just Ctrl+z to exit the run.sh, but some time it kept the port binding, so I have to restart the computer to release the port to start the server. If I work remotely, this put me into trouble.
Ctrl+z will place the server into the background and not stop it. Therefore, it will keep the port bound. You will need to use Ctrl+c, I think. Sean
If this is helpful, I'll throw this out there, too. We're using suse linux (I think these things are dependent on your flavor of linux, but maybe not?), and typically there are scripts to start and stop services in /etc/rc.d. So, I wrote one up. Before I include it, the caveats: 1. There are various checks and such that could be done, but are not. This is kind of quick-and-dirty. 2. Might be linux flavor-dependent 3. You have to set GALAXY_RUN and GALAXY_USER appropriately #!/bin/sh # # Galaxy init script written by Michael Rusch # ### BEGIN INIT INFO # Provides: galaxy # Required-Start: $local_fs $remote_fs $network # X-UnitedLinux-Should-Start: postgresql # Required-Stop: $local_fs $remote_fs $network # X-UnitedLinux-Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Galaxy daemon # Description: Start the Galaxy daemon ### END INIT INFO . /etc/rc.status rc_reset GALAXY_RUN="/srv/galaxy/run.sh" GALAXY_USER="galaxy" case "$1" in start) echo -n "Starting galaxy..." sudo -u $GALAXY_USER $GALAXY_RUN --daemon rc_done=$rc_done_up rc_status -v ;; stop) echo -n "Stopping galaxy..." sudo -u $GALAXY_USER $GALAXY_RUN --stop-daemon rc_status -v ;; restart) $0 stop $0 start rc_status ;; *) echo "Usage: $0 start|stop|restart" exit 1 esac rc_exit Then you can just do cd /etc/rc.d ./galaxy start or ./galaxy stop or ./galaxy restart Michael
-----Original Message----- From: galaxy-user-bounces@bx.psu.edu [mailto:galaxy-user- bounces@bx.psu.edu] On Behalf Of Sean Davis Sent: Saturday, October 25, 2008 1:33 PM To: very Cc: galaxy Subject: Re: [galaxy-user] restart server
On Fri, Oct 24, 2008 at 8:21 PM, very <riververy@yahoo.com> wrote:
Do you provide any program to restart the galaxy server? Currently, I just Ctrl+z to exit the run.sh, but some time it kept the port binding, so I have to restart the computer to release the port to start the server. If I work remotely, this put me into trouble.
Ctrl+z will place the server into the background and not stop it. Therefore, it will keep the port bound. You will need to use Ctrl+c, I think.
Sean _______________________________________________ galaxy-user mailing list galaxy-user@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-user
ctrl-z does not terminate a process, it just suspends it. You should use ctrl-c to send an interrupt, which will cause Galaxy to shutdown cleanly. Or you can run as a daemon using the method Greg suggested. -- jt On Oct 24, 2008, at 8:21 PM, very wrote:
Do you provide any program to restart the galaxy server? Currently, I just Ctrl+z to exit the run.sh, but some time it kept the port binding, so I have to restart the computer to release the port to start the server. If I work remotely, this put me into trouble.
_______________________________________________ galaxy-user mailing list galaxy-user@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-user
participants (5)
-
Greg Von Kuster
-
James Taylor
-
Michael Rusch
-
Sean Davis
-
very