There's a apache project for wrapping java in a daemon that will handle signals. http://commons.apache.org/daemon/
On Fri, May 13, 2011 at 12:59 PM, David Birdsong <[email protected]>wrote: > I had to rewrite our wrapper script to not fork java, but exec it: > > #!/usr/bin/env python > > import glob > import os > import sys > run_mode = os.getenv('RUN_MODE') > jvm_args = os.getenv('JVM_ARGS') > classpath = ':'.join(glob.glob('lib/*')) > cmd = [] > cmd.append('java -cp %s' % classpath) > cmd.append('-Drun.mode=%s' % run_mode) > if jvm_args: > cmd.append(jvm_args) > cmd.append(' '.join(sys.argv[1:])) > cmd = ' '.join(cmd).split() > cmd.insert(1, os.path.basename(sys.argv[0])) > os.execvp(cmd[0], cmd[1:]) > > > On Fri, May 13, 2011 at 12:26 PM, Bob Corsaro <[email protected]> wrote: > > I got it. It's because I'm using a wrapper script and when it dies, java > > stays alive. > > > > On Fri, May 13, 2011 at 3:24 PM, Bob Corsaro <[email protected]> wrote: > >> > >> No. This is on rackspace cloud. I'll try playing with stopwaitsecs. > >> BTW. a normal kill from shell works > >> On Fri, May 13, 2011 at 2:58 PM, David Birdsong < > [email protected]> > >> wrote: > >>> > >>> You have to send it a signal that it will respond to, after > >>> 'stopwaitsecs' supervisord should send it a SIGKILL which should kill > >>> any process. So either you've set stopwaitsecs=0, which IIRC will wait > >>> forever or supervisord isn't able to get an exit status from java > >>> after sending a SIGKILL--which means that java is buried in a device > >>> driver or file system driver and cannot exit. Having hard drive > >>> problems? > >>> > >>> On Fri, May 13, 2011 at 11:33 AM, Bob Corsaro <[email protected]> > wrote: > >>> > I'm running a java process from supervisor and supervisorctl restart > >>> > all > >>> > doesn't kill the old process. Any tips for dealing with java? > >>> > _______________________________________________ > >>> > Supervisor-users mailing list > >>> > [email protected] > >>> > http://lists.supervisord.org/mailman/listinfo/supervisor-users > >>> > > >>> > > >> > > > > > _______________________________________________ > Supervisor-users mailing list > [email protected] > http://lists.supervisord.org/mailman/listinfo/supervisor-users >
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
