5 Replies Latest reply on Jul 21, 2011 4:12 PM by longbeach

    Starting JBoss 7 on Linux

    longbeach

      Hi,

      I am not going to ask how to start JBoss 7 on Linux, since it's obvious :

      ./standalone.sh in a shell window.

       

      What i am wondering is how to keep the server running after closing the shell window.

       

      I mean if i start other servers such as JOnAS or Apache Tomcat and close the shell window, log out and end my linux session, the server

      is still running.

       

      With JBoss, closing the window also shutdowns the server unfortunately.

       

      I know i can start JBoss when Linux boots - http://community.jboss.org/wiki/StartJBossOnBootWithLinux  - but what i want now is to keep the server running when i log out and close my shell session.

       

      Thanks for any idea or suggestion.

        • 1. Re: Starting JBoss 7 on Linux
          sebastian.otaegui

          This is just a workaround:

           

           

          {noformat}

          nohup /usr/lib/jvm/java-6-sun/bin/java -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.boot.log.file=/home/otaeguis/dev/jboss-as-web-7.0.0.Final/standalone/log/boot.log -Dlogging.configuration=file:/home/otaeguis/dev/jboss-as-web-7.0.0.Final/standalone/configuration/logging.properties -jar /home/otaeguis/dev/jboss-as-web-7.0.0.Final/jboss-modules.jar -mp /home/otaeguis/dev/jboss-as-web-7.0.0.Final/modules -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/home/otaeguis/dev/jboss-as-web-7.0.0.Final &

          {noformat}

           

           

          For some reason when you try to do "nohup ./standalone.sh &" it starts to then shutdown and I didnt have time to review the standalone.sh script

           

          You have to, of course, change /home/otaeguis/dev with the path to your as7 installation and where it says & it should be an ampersand.

          • 2. Re: Starting JBoss 7 on Linux
            dlofthouse

            What JVM and OS are you running this with?

             

            Just tried myself and "nohup ./standalone.sh &" is workng for me.

            • 3. Re: Starting JBoss 7 on Linux
              sebastian.otaegui

              Linux (ubuntu) and sun jdk6

               

              Disregard my previous message.

               

              You are right it works for me too, I may have been asleep.

              • 4. Re: Starting JBoss 7 on Linux
                dlofthouse

                Thanks for the update Sebastian.

                 

                Celinio, as above you should be able to start JBoss with "nohup ./standalone.sh &" so that it does not terminate when the window is closed.

                • 5. Re: Starting JBoss 7 on Linux
                  longbeach

                  "nohup ./standalone.sh &"  works perfectly on Centos.

                   

                  Thanks guys