3 Replies Latest reply on Mar 4, 2010 6:20 AM by Rasa Here

    Jboss as a service

    Rasa Here Novice



      I am using jboss 4.2.3 GA. I am starting jboss using


      nohup ./run.sh -Djboss.bind.address= &

      If i want to give it on service how i will give that.


      su -l  -c 'nohup /usr1/second-jboss/jboss-4.2.3.GA/bin/run.sh -Djboss.bind.address= &' - jboss


      I tried  this command through the console and nothing happens or i am not understanding what is happening . So i guess it is wrong. Anyway i am playing with it. Please help with your suggestions and guidance.


      Thanks And Regards


        • 1. Re: Jboss as a service
          Rohit Macherla Novice

          Hi Rasa,


          Though I have not tried making JBoss startup as a service. I know that there are a few scripts that can take care of this functionality.

          You may use the scripts:





          for making JBoss start as a service. These scripts are present in the JBOSS_HOME/bin/


          Hope it helps.

          1 of 1 people found this helpful
          • 2. Re: Jboss as a service
            Rasa Here Novice

            Hi Rohit,


            I am starting jboss by using following commnad

            nohup ./run.sh -Djboss.bind.address= &


            and from bin dir when i execute

            sh jboss_init_redhat.sh stop


            It is giving following messages

            JBOSS_CMD_START = cd /usr1/jboss/jboss-4.2.3.GA/bin; /usr1/jboss/jboss-4.2.3.GA/bin/run.sh -c default

            No JBossas is currently running

            I thik it is not getting the bind address. Either that have to be hardcoded in the script or i have to pass it as an argument. Let me try all this.


            Thanks for your guidance.

            • 3. Re: Jboss as a service
              Rasa Here Novice

              Yes the issue is solved.


              1) Make a file with the name jboss, if more than one instance is there then make  jboss1, jboss2 etc and copy the belwo content in to that file. Change the file path, jnp port , binding address etc


                      echo "Starting jboss.."
              su -l -c 'nohup /usr1/jboss/jboss-4.2.3.GA/bin/run.sh -Djboss.bind.address= &' - jboss


                      echo "Stopping jboss ...."
              su -l -c 'nohup /usr1/jboss/jboss-4.2.3.GA/bin/shutdown.sh --server &' - jboss

              # give stuff some time to stop before we restart
                     sleep 60
              # protect against any services that can't stop before we restart (warning this kills all Java instances running as 'jboss' user)
              # if the 'su -l ...' command fails try:



              Thanks and Regards