Running JBoss 6 with Runit / daemontools or other process supervision framework

Posted by Alex Recarey on Server Fault See other posts from Server Fault or by Alex Recarey
Published on 2012-01-09T18:30:57Z Indexed on 2014/06/02 21:31 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

I'm tying to use runit to daemonize JBoss.

I use the /opt/jboss-6.1.0.Final/bin/run.sh script to start the server. When I do so from the comandline, JBoss does not detach (which is what we want), and will also shut down when CTRL+C is pressed. In theory a perfect candidate to use runit on.

Everything works fine except when I try to get runit to shut down JBoss. When I issue the command sv stop jboss nothing happens. Runit thinks the process is stopped but jboss continues to run normally.

I'm not doing anything special with the run script. This is my runit run script:

#!/bin/sh
exec 2>&1
exec /opt/jboss-6.1.0.Final/bin/run.sh -c standard -b 0.0.0.0

Looking at the jboss_init_redhat.sh script, the start section does mention ./bin/run.sh but the stop section has the following text:

JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}

Any ideas of what I could try?

© Server Fault or respective owner

Related posts about linux

Related posts about jboss