1 Reply Latest reply on Aug 18, 2003 8:22 AM by Jon Barnett

    jboss on redhat startup

    Richard Bottoms Newbie

      Hi, I've returned to JBoss after a year of other projects and need to solve a problem that I never got working before.

      1. How do I make Jboss start when my RedHat 8.0 server boots?

      2. How do I check to see if JBoss is still alive using crontab and restart if it is not?

      Any help is appreciated.

        • 1. Re: jboss on redhat startup
          Jon Barnett Master

          You would need to create an init.d script and install it - man chkconfig to see how that is done. The attached script is pretty basic and works with JBoss 3.2.x. You would put this in /etc/init.d and probably call it jboss.

          You will need to modify the run.sh script of the 3.2.x distribution. Near the start of the script (after all the comments), put a line:
          echo $$ > /tmp/jboss.pid

          This dumps the pid of the run.sh script into /tmp/jboss.pid that the init.d script uses. The "exec" of the JVM will inherit this PID.

          You can check whether the JBoss PID still exists with the same code used in the attached init.d script. Note that this test only checks whether the process still exists. It does not check the health of JBoss - whether it has hung, whether any services are running and so on. This would require a lot more work beyond a simple script to determine.