3 Replies Latest reply on Aug 8, 2003 12:43 AM by jonlee

    JBoss-3.2.1 on RH9 oddities

    rwhart

      HI,
      I have installed IBM-Java2SDK and JBoss 3.2.1. I can cd to /usr/local/jboss/bin and run start.sh without a problem. A 'ps ax | grep jboss' returns a pid.

      I built the /etc/init.d/jboss shell script and the /usr/local/jboss/bin/go.sh script per the docs. When I run '/etc/init.d/jboss start' everything seems to start okay. However, a 'ps ax | grep jboss' shows no pid, but a 'cat /var/run/jboss.pid' shows that a pid exists. [This may simply be my lack of expertese with Linux].

      When run '/etc/init.d/jboss stop' I get a failure notice but the file '/var/run/jboss.pid' has been removed. Where can I start looking for the shutdown failure?

      Also is the lack of a pid returned by 'ps ax | grep jboss'
      usual when a pid file exists in /var/run?

      Thanks.

      Bob

        • 1. Re: JBoss-3.2.1 on RH9 oddities
          jonlee

          I'm not really familiar with the scripts to which you refer. However, the jboss.pid is a manufactured file as starting JBoss does not actually cause this file to be created. Most likely, the script looks for the pid reported in a ps ax | .. and stores that to file. Since JBoss takes a while to bootstrap in most cases, the existence of a PID file is not a guarantee that sometime after the file is created that the bootstrap did not fail. Similarly, the standard shutdown command communicates with the JBoss server to signal a shutdown and pays no attention to the pid file. Most likely, the wrapper script you wrote just checks that the pid has disappeared after the shutdown signal, and deleted the pid file.

          I would look at server/instance/log/server.log and see if it successfully started (and you should see all the things JBoss does as it bootstraps). There should be a line with ".. Completed in .." telling you how long it took JBoss to bootstrap. If not, start checking back through and try to determine the problem. If there is no output (check date/time stamps), then probably the shell script did not start JBoss.

          Sanne is currently working on an operations manual that will have a working init.d script but I'm not sure how long it will take to complete the document. I've also posted a raw script in this forum - it requires work but should be an ok starting point for someone reasonable with shell scripts.

          • 2. Re: JBoss-3.2.1 on RH9 oddities
            rwhart

            Hi jonlee and others,
            There are two scripts on pp 21+ of the free downloadable "JBoss Getting Started" on jboss.org web site. That's where my ? come from. I have worked some of my issues out but referring to the script called "go.sh" in the book there is a reference to the varialbe JBOSS_OPTS. Presumably this refers to jboss options but I cannot find any references to it.
            It would be great if there was a well written init.d script to run jboss as a daemon.

            Thanks for your 1st response.

            Bob

            • 3. Re: JBoss-3.2.1 on RH9 oddities
              jonlee

              I must admit that I ignore the free guide as it is dated and some things just no longer apply.

              There is nothing overly special about starting JBoss, at least not on RedHat 7.2. I can't imagine that much has changed in RedHat 9.

              The core for starting JBoss in a root initiated script should be something along the lines of:
              cd /usr/local/JBoss-3.2.0/bin
              su -p -s /bin/sh -c "./run.sh 2>&1 >run.log &" apache

              Any customizations can be made in the run.sh. For example, setting your JAVA_OPTS to reflect any special JVM settings such as -Xrs and similar.

              I attach a rudimentary jboss init.d script that works for RedHat 7.2. I'm sure it could be improved but it works.