4 Replies Latest reply on Mar 4, 2005 5:18 AM by Nitin Shreyakar

    During the HAJMS master moving ....

    Chen Wang Newbie

      Hi:

      I need to stop my own MBean at the very begin time when the first master crashes and wait to restart my own MBean until it find the jboss has finish the master moving. I wonder a better way would be to register my own MBean as a listener to some part of jboss in which way I don't need to touch jboss code.

      Thank advance!

        • 1. Re: During the HAJMS master moving ....
          Chen Wang Newbie

          BTW, I use jboss 3.2.5 .

          • 2. Re: During the HAJMS master moving ....
            Chen Wang Newbie

            Sorry for missing.
            1. I tried the ExceptionListener, seems the OnException didn't been called.

            2. The very begin exception in jboss log show as bellow, I can't figure out where to go further.

            ------------------------------------------
            2004-07-08 12:26:16,093 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected:
            org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.io.EOFException)
            at org.jboss.mq.Connection.asynchFailure(Connection.java:429)
            at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
            at java.lang.Thread.run(Thread.java:534)
            Caused by: java.io.EOFException
            at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2603)
            at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:279)
            ... 1 more
            2004-07-08 12:26:16,094 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Trying to reconnect to JMS provider
            2004-07-08 12:26:16,096 WARN [org.jboss.mq.Connection] Connection failure:
            org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.io.EOFException)
            at org.jboss.mq.Connection.asynchFailure(Connection.java:429)
            at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
            at java.lang.Thread.run(Thread.java:534)
            Caused by: java.io.EOFException
            at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2603)
            at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:279)
            ... 1 more
            2004-07-08 12:26:26,098 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not stop JMS connection
            org.jboss.mq.SpyJMSException: Cannot disable the connection with the JMS server; - nested throwable: (java.io.IOException: Client is not connected)
            at org.jboss.mq.Connection.doStop(Connection.java:1282)
            at org.jboss.mq.Connection.stop(Connection.java:711)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStop(JMSContainerInvoker.java:832)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1265)
            at org.jboss.mq.Connection.asynchFailure(Connection.java:439)
            at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
            at java.lang.Thread.run(Thread.java:534)
            Caused by: java.io.IOException: Client is not connected
            at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:226)
            at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:192)
            at org.jboss.mq.il.uil2.UILServerIL.setEnabled(UILServerIL.java:162)
            at org.jboss.mq.Connection.doStop(Connection.java:1278)
            ... 8 more
            2004-07-08 12:26:26,101 DEBUG [cdot.jboss.JBossMQProvider] connecting to remote JNDI with props: {java.naming.provider.url=localhost:1100,192.168.2.21:1100,192.168.2.41:1100, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.rmi.security.manager=yes, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            2004-07-08 12:26:26,107 WARN [org.jnp.interfaces.NamingContext] Failed to connect to 192.168.2.21:1100
            javax.naming.CommunicationException: Failed to connect to server 192.168.2.21:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.2.21:1100 [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 cdot.jboss.JBossMQProvider.getInitialContext(JBossMQProvider.java:109)
            at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:148)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:237)
            at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:164)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:542)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:764)
            at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1267)
            at org.jboss.mq.Connection.asynchFailure(Connection.java:439)
            at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
            at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
            at java.lang.Thread.run(Thread.java:534)
            Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.2.21:1100 [Root exception is java.net.ConnectException: Connection refused]
            at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:187)
            ... 16 more

            • 3. Re: During the HAJMS master moving ....
              Elias Ross Master


              In JMX, every time a service changes state, it sends out a notification message. You can register for these. You can also add to your MBean for that service.

              I'm not sure what happens under HAJMS, but you can get a feel through the jmx-console what services shutdown/startup during this transition.

              • 4. Re: During the HAJMS master moving ....
                Nitin Shreyakar Newbie


                Hi,

                I have got exactly similar problem but still not got a solution for it. If anyone out there has any words of wisdom or any idea about getting a soln for it.

                Thanks in advance,
                Nitin.