4 Replies Latest reply on Oct 29, 2008 2:20 PM by peterj

    Verifying JBOSS Startup and Shutdown via STD Out

    avalanche333

      I am writing some JAVA code that will SSH into a linux server and run the start and stop scripts for JBOSS.

      My knowledge of JBOSS is basically 0. What I basically would like to know is what std out trace I can look for in my SSH Session to verify the JBOSS startup script (to my knowledge this is run.sh) has ran successfully (or failed) and started JBOSS?

      Once this is complete I would like to do a ps (or whatever else I can do) to verify the JBOSS server is actually running. (Remembering all I have to work with is the STD Out trace)

      I would like to do the same for a the shutdown script (shutdown.sh -S)?

      Can someone please help me out and let me know what is the proper std out trace I should be looking for to do a proper verification that JBOSS server is running through STD OUT.

      Thanks,

        • 1. Re: Verifying JBOSS Startup and Shutdown via STD Out
          will.tatam

          I would recommend starting and stopping using the init.d script provided with the jpackage.org packaging of jboss

          • 2. Re: Verifying JBOSS Startup and Shutdown via STD Out
            peterj

            JBossAS will log messages to stdout - look for the "Started in xxx seconds" message. Once you see that, initialization is complete, though, if there were errors, some things will not work.

            The shutdown script also prints some text to stdout,

            I suggest that you run the JBossAS scripts locally and observe the output. Then you can better decide how to code your script.

            • 3. Re: Verifying JBOSS Startup and Shutdown via STD Out
              avalanche333

              Thanks for the help guys.

              I have observed the output. Now is there a way to verify the start/stop actually worked? IE checking running processing or something? The shutdown.sh script simply says that something was posted to the server and to check the logs. Logs could be in any location on different servers so i want to stay away from checking that.

              • 4. Re: Verifying JBOSS Startup and Shutdown via STD Out
                peterj

                For shutdown, the log that is referred to is the jboss_home/server/xxx/log/server.log file (where 'xxx' is the configuration name, typically 'default'). This log will contain the shutdown messages.

                To check that startup was successful, a typical mechanism is to make an http request to port 8080 - if you get back a response it is (usually) running (actually, it just means the the http server is up). Another way would be to scan the console log for exceptions - if there are none then everything is OK.