0 Replies Latest reply on Oct 27, 2004 6:02 PM by V. Jenks

    cannot get server to run on boot...

    V. Jenks Newbie

      I'm trying to get jboss to run on startup but I just can't figure out what's going wrong...

      I can start it manually and it works just fine, however, jboss constantly writes to the console so I'm "locked" into it until I shut it down, when it is started manually, so I need the startup script to auto-launch and silence it (not familiar enough w/ it to know exactly what happens here but it normally would work).

      I'm using Gentoo Linux on an x86 athlon-xp machine.

      Here's my (bash) shell script (added my own output for testing):

      depend() {
       use net
      }
      
      start() {
       ebegin "Starting JBoss"
       if [ -z "$JBOSS_HOME" ]; then
       eerror "The JBOSS_HOME environment variable is not set."
       return 1
       fi
       if [ ! -d ${SERVER_HOME}/${JBOSS_CONF}/tmp ]; then
       mkdir ${SERVER_HOME}/${JBOSS_CONF}/tmp
       chown jboss:jboss ${SERVER_HOME}/${JBOSS_CONF}/tmp
       echo "DEBUG: temp directory did not exist!"
       fi
       cd ${SERVER_HOME}/${JBOSS_CONF}/tmp
       if [ -z "${SUBIT}" ]; then
       eval ${CMD_START} >${JBOSS_CONSOLE} 2>&1 &
       else
       ${SUBIT} "${CMD_START} >${JBOSS_CONSOLE} 2>&1 &"
       echo "DEBUG: Jboss console started, should work! "
       fi
       eend $?
      }
      
      stop() {
       ebegin "Stopping JBoss"
       if [ -z "$SUBIT" ]; then
       ${CMD_STOP}
       else
       ${SUBIT} "$CMD_STOP"
       fi
       eend $?
      }
      


      While watching the services start on boot I see ""DEBUG: Jboss console started, should work! " of course, but it isn't *really* working...

      ...my JBOSS_HOME value:

      /opt/jboss-3.2.6
      


      I've verified that this is correct, remember I said I could launch run.sh manually from the /opt/jboss-3.2.6/bin directory, works great, but not what I need.

      When I launch it manually I can see "localhost:8080/jmx-console" without a problem, when I let the script launch it on startup, I get an error, connection refused, so I know the server hasn't started. It also appears to start just a *little* too fast, like it is immediately shutting down.

      If I knew how to get my hands on this output from the console w/o "locking up" on startup, it might help.

      The logs are not being written to with the boot script so there is no help there...

      Any help would be very much appreciated, thanks!!