5 Replies Latest reply on Mar 17, 2011 1:08 AM by Mahesh Bhole

    ServiceUnavailableException in Jboss AS6

    Mahesh Bhole Newbie

      Hi,

       

      I am facing problem with Jboss AS 6 restart on RHEL.

      This is happening only when I restart Jboss immediately after stop.

      Should this problem be solved by adding some sleep time in script or Is there ant other way..may be like deleting PID file or something like that.?

       

      [root@localhost ~]#  /etc/init.d/jboss-as-test2 restart

      Sleeping for 100

      JBOSS_CMD_START = cd /etc/jboss-as/test2/bin; /etc/jboss-as/test2/bin/run.sh -c test2 -b 192.168.56.2

      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: 192.168.56.2; 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: 192.168.56.2; 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:257)

              ... 2 more

      Caused by: java.rmi.ConnectException: Connection refused to host: 192.168.56.2; 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: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: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

       

       

      Thanks,

      Mahesh