1 Reply Latest reply on Feb 22, 2005 12:58 PM by starksm64

    shutdown jboss not possible

    sridharb

      Hi,

      Inorder to run more than one JBoss instance on a single rhel host, I edited the ports jboss uses. I was able to startup jboss on new ports and use it. But shutdown.sh -S is still looking on port 1099 and so jboss is not stopping. These are changes i made:

      jboss-3.2.5/server/default/deploy/jbossweb-tomcat50.sar/server.xml
      --------------------------------------------------
      8080 --> 9080
      8009 --> 9009
      jboss-3.2.5/server/default/deploy/jmx-console.war/cluster/clusterView.jsp
      --------------------------------------------------
      8080 --> 9080
      jboss-3.2.5/server/default/deploy/jmx-console.war/cluster/bootstrap.html
      --------------------------------------------------
      1099 --> 9099
      jboss-3.2.5/server/default/conf/jboss-minimal.xml
      --------------------------------------------------
      1099 --> 9099
      jboss-3.2.5/server/default/conf/jboss-service.xml
      --------------------------------------------------
      8083 --> 9083
      1098 --> 9098
      1099 --> 9099
      4444 --> 9444
      4445 --> 9445

      Please note that, I have taken care to set correct JBOSS_HOME and shutdown.sh is picking up correct classpath. Error message I am getting is:

      18:14:16,700 WARN [NamingContext] Failed to connect to localhost:1099
      javax.naming.CommunicationException: Failed to connect to server localhost:1099
      [Root exception is javax.naming.ServiceUnavailableException: Failed to connect t
      o server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:213)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1185)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.Shutdown.main(Shutdown.java:188)
      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:187)
      ... 5 more
      Caused by: java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:452)
      at java.net.Socket.connect(Socket.java:402)
      at java.net.Socket.(Socket.java:309)
      at java.net.Socket.(Socket.java:211)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:183)
      ... 5 more
      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1198)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.Shutdown.main(Shutdown.java:188)

      thanks for your help.
      regards,
      sreedhar.

        • 1. Re: shutdown jboss not possible
          starksm64

           

          Based on:
          
          [starksm@banshee9100 bin]$ ./shutdown.sh -h
          A JMX client to shutdown (exit or halt) a remote JBoss server.
          
          usage: shutdown [options] <operation>
          
          options:
           -h, --help Show this help message
           -D<name>[=<value>] Set a system property
           -- Stop processing options
           -s, --server=<url> Specify the JNDI URL of the remote server
           -n, --serverName=<url> Specify the JMX name of the ServerImpl
           -a, --adapter=<name> Specify JNDI name of the MBeanServerConnection to
          use
           -u, --user=<name> Specify the username for authentication
           -p, --password=<name> Specify the password for authentication
          
          operations:
           -S, --shutdown Shutdown the server (default)
           -e, --exit=<code> Force the VM to exit with a status code
           -H, --halt=<code> Force the VM to halt with a status code
          
          The following should do the trick:
          
          shutdown.sh -s host:port -S