1 Reply Latest reply on May 20, 2005 9:23 AM by mhebert

    Shutting Down a Second Instance of JBoss

    mhebert

      I am running a test installation of JBoss 4.0.2 on Windows 2000 (SP4) with Sun JDK 1.4.2_07. I have set up two instances of JBoss (slightly modified 'all' server config) using the binding manager (one is running as 'ports-default', the other is running as 'ports-01'). I can start them up just fine, but am having problems with shutdown.

      If I run 'shutdown -S' from the command line, it will shutdown the 'ports-default' instance without issue. If, however, I want to shut down either instance by referring to it using the JNDI URL, it will just hang (no exceptions or errors). I have tried to shut down both instances with the following command: 'shutdown -s jnp://localhost:1098 -S' (ports-default) or 'shutdown -s jnp://localhost:1198 -S' (ports-01). Both versions will hang (ctrl-c will kill the batch process). If I stop the two servers and try the above commands, then it throws like this:

      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1098 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1098 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1098 [Root exception is java.net.ConnectException: Connection refused: connect]]]

      It just looks like it is finding the server at the specified port (when running), but is hanging. It is failing (correctly) when the server is stopped.

      Any ideas? Am I not using the -s option to shutdown correctly? Are there other options I need to specify?

        • 1. Re: Shutting Down a Second Instance of JBoss
          mhebert

          And to answer my own question...

          JNP runs on 1099 in 'ports-default'. RMI is running on 1098, hence the hanging. I assumed that the same port used for (RMI) JMX access would be where shutdown requests are sent. If I had watched more closely on server startup, I would have seen this:

          09:19:12,286 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server Socket Factory=org.jboss.net.sockets.DefaultSocketFactory@ad093076