5 Replies Latest reply on Jul 9, 2007 2:58 PM by djhititup

    Exception is thrown when shutting down the server

    djhititup

      When shutting downt he server with:

      shutdown.sh --shutdown

      The exception that is being thrown is:

      Exception: 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 (errno:239)]]]
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      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 (errno:239)]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
      ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused (errno:239)]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
      ... 5 more
      Caused by: java.net.ConnectException: Connection refused (errno:239)
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      at java.net.Socket.connect(Socket.java:517)
      at java.net.Socket.connect(Socket.java:467)
      at java.net.Socket.(Socket.java:364)
      at java.net.Socket.(Socket.java:265)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
      ... 5 more


      Why is this? I take it this is not a good shutdown of JBoss so what can I do to resolve the issue?

        • 1. Re: Exception is thrown when shutting down the server
          djhititup

          Now the exception being thrown is this:

          Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/Shutdown (Unsupported major.minor version 49.0)
          at java.lang.ClassLoader.defineClass0(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


          Why?

          • 2. Re: Exception is thrown when shutting down the server
            peterj

            Classes with version 49.0 were compiled using a 5.0 JDK. Apparently you are running an earlier JVM (perhaps 1.4.2?)

            • 3. Re: Exception is thrown when shutting down the server
              djhititup

              I got that resolved but now I'm getting the first exception that i posted. I'm starting the server like this:


              run.sh -b <server_name> -c <server_instance>

              The <server_name> is actually the server name from the host file and NOT the ip.

              • 4. Re: Exception is thrown when shutting down the server
                peterj

                Because you used the -b option to start the app server, you must also supply the host name to shut the app server down:

                ./shutdown.sh --server=<server-name>:1099 --shutdown


                • 5. Re: Exception is thrown when shutting down the server
                  djhititup

                  Thanks so much. It would have been nice for them to be consistent with the parameter names. Thanks again.