4 Replies Latest reply on Nov 1, 2002 5:54 AM by Juha Lindfors

    Cannot start JBoss 3.0.3 on RedHat 7.3

    Sascha Newbie

      Hi,

      I've got the scripts jboss.sh (in init.d) and go.sh (in /bin), but nothing happens if I call "./jboss.sh start". I only get the output
      [root@bordeaux init.d]./jboss.sh start
      Starting JBoss/Tomcat daemon: [ OK ]
      [root@bordeaux init.d]

      I'm not familar with Linux. Can sombody tell me what's the problem with JBoss? I'm root and both scripts are executable.

      script jboss.sh (executable):
      #!/bin/sh

      . /etc/rc.d/init.d/functions

      export JAVA_HOME=/usr/java/j2sdk1.4.1_01/bin

      export JBOSS_HOME=/usr/local/jboss3

      export PATH=$PATH:$JBOSS_HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

      RETVAL=0

      # See how we were called.
      case "$1" in
      start)
      cd $JBOSS_HOME/bin
      echo -n "Starting JBoss/Tomcat daemon: "
      daemon $JBOSS_HOME/bin/go.sh start
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/jboss
      ;;
      stop)
      echo -n "Stopping JBoss/Tomcat daemon: "
      killproc jboss
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/jboss
      ;;
      restart)
      echo -n "Restarting jboss daemon: "
      $0 stop
      sleep 2
      $0 start
      ;;

      esac


      go.sh (executable):
      #!/bin/sh

      export JBOSS_HOME=/usr/local/jboss3
      export JAVA_HOME=/usr/java/j2sdk1.4.1_01

      JAVACMD=$JAVA_HOME/bin/java

      JBOSS_CLASSPATH=$CLASSPATH:$JBOSS_HOME/bin/run.jar

      JBOSS_CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar

      if [ "$1" = "start" ] ; then
      shift
      #echo -n "JBoss starting:"
      $JAVACMD $JBOSS_OPTS -classpath $CLASSPATH org.jboss.Main -c tomcat > /dev/null 2>&1 &
      echo $! > /var/run/jboss.pid
      elif [ "$1" = "stop" ] ; then
      shift
      #echo -n "JBoss stoping:"
      kill -15 `cat /var/run/jboss.pid`
      rm -rf /var/run/jboss.pid

      elif [ "$1" = "run" ] ; then
      shift
      $JAVACMD $JBOSS_OPTS -classpath $CLASSPATH org.jboss.Main -c tomcat "$@"

      else
      echo "Usage:"
      echo "jboss (start|run|stop)"
      echo " start - start jboss in the background"
      echo " run - start jboss in the foreground"
      echo " stop - stop jboss"

      exit 0
      fi



      Thanks!