6 Replies Latest reply on Mar 17, 2009 10:07 AM by szhigunov

    MessagingXAResourceRecovery can not reconnect

    szhigunov

      Hi,
      I am testing JBM XA recovery. I have two JBoss servers. Server A runs a non-clustered queue. Server B runs a JMS listener, which connects to server A through JCA + remote JMS provider. I added the following configuration to server B (where TM is running) to turn the recovery on:

      property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"
      value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/BusJMSProvider,AgentBUSQ6,PassBUSQ6"

      The system starts up normally. The problem is that if I kill server A and then start it again, I am getting the following warning on server B:
      [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL

      Which tells me that recovery system can not reconnect to the remote JMS server. That warning continues until I restart the server B. Obviously, any recovery scenarios would not work if XAResource can not connect to its RM.

      Can anybody advise me on this problem?

      I am running JBoss 4.2.2 + JBM 1.4.0.SP3.

      Thanks.

        • 1. Re: MessagingXAResourceRecovery can not reconnect
          timfox

           

          "szhigunov" wrote:
          Hi,
          I am testing JBM XA recovery. I have two JBoss servers. Server A runs a non-clustered queue. Server B runs a JMS listener, which connects to server A through JCA + remote JMS provider. I added the following configuration to server B (where TM is running) to turn the recovery on:

          property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"
          value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/BusJMSProvider,AgentBUSQ6,PassBUSQ6"

          The system starts up normally. The problem is that if I kill server A and then start it again, I am getting the following warning on server B:
          [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL

          Which tells me that recovery system can not reconnect to the remote JMS server. That warning continues until I restart the server B. Obviously, any recovery scenarios would not work if XAResource can not connect to its RM.



          I don't understand what behaviour you expect. Clearly, in order to recover an xa resource, the server which hosts that resource must be running!

          • 2. Re: MessagingXAResourceRecovery can not reconnect
            szhigunov

            Sorry for confusion, but I was trying to say that "server which hosts that resource" was restarted, not just stopped (kill server A and then start it again). And even after it is back, the server which runs the transaction would keep logging the warning.

            So I have both server up and running, my JMS listener reconnects, but recovery keeps saying it can not see resource any more.

            • 3. Re: MessagingXAResourceRecovery can not reconnect
              szhigunov

              Can anybody comment on this, please?

              I think JBM recovery code is expected to handle the remote resource restart.

              To restate the problem. I have recovery configured on the JMS client, which connects to the remote server. If I bounce (restart) the remote server, the recovery module starts giving warnings (and keeps doing that even after the remote server is back):
              [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL

              I can see in the debugger that MessagingXAResourceWrapper.recover() gets XAException with "Failed to get prepared transactions" message, than calls check() which has reconnect logic but it is bypassed.

              I can force MessagingXAResourceWrapper.check() to run the reconnect logic in the debugger. That clears things up and warning goes away.

              • 4. Re: MessagingXAResourceRecovery can not reconnect
                mclu

                Hi!

                Have you solved that issue? I have the same behavior with my bridges.

                I have multiple nodes connected to one "root" node via bridges.
                In that root node all bridges are configured and usinf remoteProviderLoaders.
                I have added them on the jta configuration like:

                <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1" value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/DefaultJMSProvider"/>
                 <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING2" value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/RemoteJMSProvider_NodeA"/>
                 <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING3" value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/RemoteJMSProvider_NodeB"/>
                


                If I now kill one node and restart it, the bridges are reconnecting but I get the same warnings like you....:

                ...
                10:53:42,625 INFO [Bridge] jboss.messaging:name=IncommingBridge_NodeB,service=Bridge Succeeded in reconnecting to servers
                10:55:35,953 WARN [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL
                10:57:46,234 WARN [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL
                10:59:56,515 WARN [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL
                11:02:06,890 WARN [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMFAIL
                ...
                


                • 5. Re: MessagingXAResourceRecovery can not reconnect
                  mclu

                  I forgot to say:
                  JB 4.2.3
                  JBM 1.4.2.SP1

                  • 6. Re: MessagingXAResourceRecovery can not reconnect
                    szhigunov

                    No. We got away from using JBM recovery for number of reasons. Implemented custom XA based solution.