6 Replies Latest reply on Jan 13, 2005 12:04 PM by mazz

    Stoppping Jboss

    femto

      Hello,

      I start my application using run.sh like this :
      $JBOSS_HOME/bin/run.sh -c myappli

      How can I stop it in the same way, I mean by specifying the server to stop. My problem is that I start a lot of JBoss on the same box, on the same account (but different server).

      Thank you !

      Femto

        • 1. Re: Stoppping Jboss
          tperrigo

          You can use the shutdown script (also in the $JBOSS_HOME/bin directory) and specify the url of the server to shutdown:

          $JBOSS_HOME/bin/shutdown.sh -s localhost:1099

          See
          http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch01.html#d0e1391 for more information.

          Tim

          • 2. Re: Stoppping Jboss
            femto

            Yes I see that in the documentation but the URL is a JNDI URL :

            -s, --server= Specify the JNDI URL of the remote server

            I don't use JNDI.
            When i try it, I get an error :

            Exception in thread "main" javax.naming.NameNotFoundException: jmx not bound

            I don't use JMX also.



            • 3. Re: Stoppping Jboss
              mveitas

              Have you removed anything from the deploy directory? Specifically the jmx-adapator-invoker.sar?

              • 4. Re: Stoppping Jboss
                femto

                 

                "mveitas" wrote:
                Have you removed anything from the deploy directory? Specifically the jmx-adapator-invoker.sar?




                Yes. I have almost deleted all the content of the directory.

                • 5. Re: Stoppping Jboss
                  femto

                  Why is there a link between JNDI and JMX ?

                  • 6. Re: Stoppping Jboss
                    mazz

                    You could always go outside of JBoss to do this - you can on your own determine the process PID that your run.sh started and issue a kill yourself. This might mean tweeking run.sh or any wrapper startup script that you use so you get the PID (perhaps have the script dump out to stdout the PID number?). This would allow you to not have to rely on any feature deployed or not deployed in JBoss - its also more kludgy than using the JBoss shutdown mechanism :-) It also means you can only kill JBoss instances on the local box where you issue the kill.