Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-715

ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Failover transport not connected: unconnected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBoss A-MQ 6.0, JBoss A-MQ 6.1
    • Fix Version/s: JBoss A-MQ 6.2
    • Component/s: rar-jee
    • Labels:
      None
    • Environment:

      JBoss EAP 6.2.x and EAP 6.3

    • Steps to Reproduce:
      Hide

      To reproduce the issue follow the steps:

      Install Jboss EAP 63.

      • start JBoss EAP server with command
        standalone.sh --server-config=standalone-full.xml
      • start jboss-cli.sj and deploy AMQ RA using deploy command
      • edit the standalone-full.xml and add the resource adapter section below:

        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
                    <resource-adapters>
                        <resource-adapter id="amq-ra">
                            <archive>
                                activemq-rar-5.9.0.redhat-610379.rar
                            </archive>
                            <transaction-support>XATransaction</transaction-support>
                            <config-property name="UseInboundSession">
                                true
                            </config-property>
                            <config-property name="Password">
                                admin
                            </config-property>
                            <config-property name="UserName">
                                admin
                            </config-property>
                            <config-property name="ServerUrl">
                                failover:(tcp://ragga:61616?trace=true,tcp://raggz:61616?trace=true)?initialReconnectDelay=100&amp;jms.rmIdFromConnectionId=true&amp;maxReconnectAttempts=0
                            </config-property>
                            <connection-definitions>
                                <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:jboss/jms/activemq/ConnectionFactory" enabled="true" use-java-context="true" pool-name="AMQConnectionFactory" use-ccm="true">
                                    <config-property name="UseInboundSession">
                                        false
                                    </config-property>
                                    <config-property name="UserName">
                                        admin
                                    </config-property>
                                    <config-property name="Password">
                                        admin
                                    </config-property>
                                    <config-property name="ServerUrl">
                                        failover:(tcp://ragga:61616?trace=true,tcp://raggz:61616?trace=true)?initialReconnectDelay=100&amp;jms.rmIdFromConnectionId=true&amp;maxReconnectAttempts=0
                                    </config-property>
                                    <xa-pool>
                                        <min-pool-size>5</min-pool-size>
                                        <max-pool-size>10</max-pool-size>
                                        <is-same-rm-override>false</is-same-rm-override>
                                    </xa-pool>
                                    <recovery no-recovery="false">
                                        <recover-credential>
                                            <user-name>admin</user-name>
                                            <password>admin</password>
                                        </recover-credential>
                                    </recovery>
                                </connection-definition>
                            </connection-definitions>
                            <admin-objects>
                                <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/inQueue" enabled="true" use-java-context="true" pool-name="inQueue">
                                    <config-property name="PhysicalName">
                                        IN.QUEUE
                                    </config-property>
                                </admin-object>
                                <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/testQueue" enabled="true" use-java-context="true" pool-name="testQueue">
                                    <config-property name="PhysicalName">
                                        TEST.QUEUE
                                    </config-property>
                                </admin-object>
                                <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/outQueue" enabled="true" use-java-context="true" pool-name="outQueue">
                                    <config-property name="PhysicalName">
                                        OUT.QUEUE
                                    </config-property>
                                </admin-object>
                            </admin-objects>
                        </resource-adapter>
                    </resource-adapters>
                </subsystem>
        

      • you may have to modify the hosts name in the ServerUrl property
      • restart JBoss Server with standalone-full.xml profile that includes the above resource adapter configuration
      • wait and observe the log file.
      Show
      To reproduce the issue follow the steps: Install Jboss EAP 63. start JBoss EAP server with command standalone.sh --server-config=standalone-full.xml start jboss-cli.sj and deploy AMQ RA using deploy command edit the standalone-full.xml and add the resource adapter section below: <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="amq-ra"> <archive> activemq-rar-5.9.0.redhat-610379.rar </archive> <transaction-support>XATransaction</transaction-support> <config-property name="UseInboundSession"> true </config-property> <config-property name="Password"> admin </config-property> <config-property name="UserName"> admin </config-property> <config-property name="ServerUrl"> failover:(tcp://ragga:61616?trace=true,tcp://raggz:61616?trace=true)?initialReconnectDelay=100&amp;jms.rmIdFromConnectionId=true&amp;maxReconnectAttempts=0 </config-property> <connection-definitions> <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:jboss/jms/activemq/ConnectionFactory" enabled="true" use-java-context="true" pool-name="AMQConnectionFactory" use-ccm="true"> <config-property name="UseInboundSession"> false </config-property> <config-property name="UserName"> admin </config-property> <config-property name="Password"> admin </config-property> <config-property name="ServerUrl"> failover:(tcp://ragga:61616?trace=true,tcp://raggz:61616?trace=true)?initialReconnectDelay=100&amp;jms.rmIdFromConnectionId=true&amp;maxReconnectAttempts=0 </config-property> <xa-pool> <min-pool-size>5</min-pool-size> <max-pool-size>10</max-pool-size> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <recovery no-recovery="false"> <recover-credential> <user-name>admin</user-name> <password>admin</password> </recover-credential> </recovery> </connection-definition> </connection-definitions> <admin-objects> <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/inQueue" enabled="true" use-java-context="true" pool-name="inQueue"> <config-property name="PhysicalName"> IN.QUEUE </config-property> </admin-object> <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/testQueue" enabled="true" use-java-context="true" pool-name="testQueue"> <config-property name="PhysicalName"> TEST.QUEUE </config-property> </admin-object> <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/jms/amq/queue/outQueue" enabled="true" use-java-context="true" pool-name="outQueue"> <config-property name="PhysicalName"> OUT.QUEUE </config-property> </admin-object> </admin-objects> </resource-adapter> </resource-adapters> </subsystem> you may have to modify the hosts name in the ServerUrl property restart JBoss Server with standalone-full.xml profile that includes the above resource adapter configuration wait and observe the log file.

      Description

      When using failover protocol in ServerUrl in AMQ RA the following exceptions can been seen in the server log file:

      10:19:36,053 INFO  [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Successfully connected to tcp://ragga:61616?trace=true
      10:21:46,139 INFO  [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Successfully connected to tcp://ragga:61616?trace=true
      10:21:46,139 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Failover transport not connected: unconnected
      	at org.apache.activemq.TransactionContext.recover(TransactionContext.java:656)
      	at org.apache.activemq.ra.LocalAndXATransaction.recover(LocalAndXATransaction.java:135)
      	at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:177)
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:548) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:187) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
       
      10:21:56,165 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016008: Local XARecoveryModule.xaRecovery - caught exception: java.lang.NullPointerException
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:619) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:431) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:212) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
       
      10:23:56,172 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Failover transport not connected: unconnected
      	at org.apache.activemq.TransactionContext.recover(TransactionContext.java:656)
      	at org.apache.activemq.ra.LocalAndXATransaction.recover(LocalAndXATransaction.java:135)
      	at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:177)
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:548) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:187) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.21.Final-redhat-1.jar:4.17.21.Final-redhat-1]
      

      Though the errors have not effect on working of transactions they would prevent XA recovery from working. The JBTM calls XAResource.recover() and gets error in return. I suspect that the reason fro that is that the slave broker is not _fully_ running.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                garytully Gary Tully
                Reporter:
                raggz Tom Ross
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: