3 Replies Latest reply on May 26, 2010 8:33 AM by Zemian Deng

    Can not shutdown the server

    Thomas Chang Apprentice

      I open a command-console and start the Jboss server with ./run.sh -c myserver -b ip

       

      Then I open another command-console and try to shutdown this server by "./shutdown -S". But the server can't be shutdown and I got error as follow. But I can only shutdown the server in the first command console with "ctrl-c".

       

      "

      [msgbp@s001c1002 bin]$ ./shutdown.sh -S
      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)
              at org.jboss.Shutdown.main(Shutdown.java:214)
      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
              ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
              ... 5 more

      "

       

      Can someone help?

        • 1. Re: Can not shutdown the server
          jaikiran pai Master

          Since you are starting the server with -b IP, you should use the IP while shutting down too. See this http://community.jboss.org/message/200724#200724

          • 2. Re: Can not shutdown the server
            Thomas Chang Apprentice

            Now I use "./shutdown.sh -S -s 130.144.164.232" but I got another exception as follow:

             

            [msgbp@s001c1002 bin]$ ./shutdown.sh -S -s 130.144.164.232:1099
            Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
                    at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
                    at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)

            • 3. Re: Can not shutdown the server
              Zemian Deng Apprentice

              Try passing in -u and -p options that match to what's in your <serverInstance>/conf/jmx-console-users.properties