2 Replies Latest reply on Aug 11, 2010 6:52 AM by melgosa

    Unable to shutdown a minimal "all configuration" Jboss server

    melgosa

      My Jboss is started with:

           ./run.sh -c all -b xxx.xxx.xxx.xxx

      There's no way to shutdown it(local) using the command:

          

           shutdown -S

          

           Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host:

       

           ./shutdown.sh -s --server=xxx.xxx.xxx.xxx   as well as ./shutdown.sh -s xxx.xxx.xxx.xxx

       

      Exception in thread "main" java.net.MalformedURLException: Service URL must start with service:jmx:
              at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:160)
              at org.jboss.Shutdown.main(Shutdown.java:235)

       

       

      Doc's say(http://docs.jboss.org/jbossas/docs/Installation_And_Getting_Started_Guide/5/html_single/index.html#setting_JBOSS_HOME)

       

      In 9.3.4(Stopping the server)

       

      "To shutdown the server, you simply issue a Ctrl-C sequence in the console in which JBoss was started. Alternatively, you can use the shutdown.sh command.

       

      Using the shutdown command requires a server configuration that contains the jmx-invoker-service.xml service. Hence you cannot use the shutdown command with the minimal configuration."

       

       

      I suppose my actual configuration is minimal and i suppose i need to activate that service so Shutdown.sh works with my server. Does anyone know how to do that?, if service not needed, how could i shutdown?

       

      Thanks.

        • 1. Re: Unable to shutdown a minimal "all configuration" Jboss server
          wolfgangknauf

          Hi,

           

          which JBoss version?

           

          Take a look at this document:

          https://community.jboss.org/thread/152911

          The shutdown command changed in 6.0M3. Now, it is: shutdown.bat -s service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi

           

          For previous versions, it is: shutdown.bat -s jnp://localhost:1099

           

          Hope this helps

           

          Wolfgang

          • 2. Re: Unable to shutdown a minimal "all configuration" Jboss server
            melgosa

            Well i must use shutdown.sh for linux, anyway my result is:

             

            [root@maq01 bin]# ./shutdown.sh -s service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi
            Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
                    java.net.ConnectException: Connection refused]

             


            [root@maq01 bin]# ./shutdown.sh -s service:jmx:rmi:///jndi/rmi://localhost:8080/jmxrmi
            Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
                    java.net.ConnectException: Connection refused]

             

            [root@maq01 bin]# ./shutdown.sh -s service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx:8080/jmxrmi
            Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
                    java.net.ConnectException: Connection refused]

             

            Not much new information in the link, but thank you anyway.

             

            Having used run.sh -c all -b x.x.x.x:8080 to start it. Any more ideas please?

             

            pd:6.0 M3 version

             

             

            EDIT: problem solved, there was a problem with a service due to an error in the starting script, also 'localhost' is not valid in the shutdown command, but ip works, and port is 1090 default and independent of the port which jboss is configured to work through. Thank you.