5 Replies Latest reply on Feb 18, 2012 11:30 AM by naren_kulkarni

    Need help for stop multiple instance in shell script

    Bunphot Chup Newbie

      I'm runing jboss as 6.0 final on SLSE linux.

       

      So, I was modifired the jboss_init_suse.sh for start the 2 instance.

       

      Here is the code for the modifired.

      JBOSSSH1=${JBOSSSH1:-"$JBOSS_HOME/bin/run.sh -c node1 -g ewicluster -Djboss.messaging.ServerPeerID=1 
      -Djboss.service.binding.set=ports-default -Djboss.jvmRoute='node1' -Djboss.mod_cluster.proxyList='192.168.10.168:80' 
      -Djboss.modcluster.balancer='ewicluster' -Djboss.bind.address='192.168.10.168'"}
      
      JBOSSSH2=${JBOSSSH2:-"$JBOSS_HOME/bin//run.sh -c node2 -g ewicluster -Djboss.messaging.ServerPeerID=2 
      -Djboss.service.binding.set=ports-01 -Djboss.jvmRoute='node2' -Djboss.mod_cluster.proxyList='192.168.10.168:80'
      -Djboss.modcluster.balancer='ewicluster' -Djboss.bind.address='192.168.10.168'"}
      
      

       

      My problem is when I want to stop these 2 instance there is a error occur.

       

       

      ./shutdown.sh -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: localhost; nested exception is:
              java.net.ConnectException: Connection refused]
              at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
              at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
              at org.jboss.Shutdown.main(Shutdown.java:235)
      Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
              java.net.ConnectException: Connection refused]
              at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
              at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)
              at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
              at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
              at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:255)
              ... 2 more
      Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
              java.net.ConnectException: Connection refused
              at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
              at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
              at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
              at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
              at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
              at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
              ... 7 more
      Caused by: java.net.ConnectException: Connection refused
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
              at java.net.Socket.connect(Socket.java:529)
              at java.net.Socket.connect(Socket.java:478)
              at java.net.Socket.<init>(Socket.java:375)
              at java.net.Socket.<init>(Socket.java:189)
              at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
              at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
              at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
              ... 12 more
      
      

       

      Could anyone give me a suggestion ?.

      thank you