ARJUNA016037 and ARJUNA016038 in logs after jboss crash
tomasz.lewandowski Mar 6, 2013 5:02 AMI use JBoss 7.1.3.Final (compiled from source).
I have a simple app with MDB that executes a distributed transaction that consumes a message from a queue on external standalone HornetQ (2.2.14.Final) server, inserts a row into PostgreSQL 9.1 and sends a message to a different queue.
I use Byteman tool to inject a VM halt when the 2nd participant (DB) is asked to commit. After a crash I observe that the message is consumed from queue and there is a prepared transaction on PostgreSQL, great.
After JBoss restart I observe that the transaction on PostgreSQL got commited (ok) but JBoss logs (every 2 minutes):
09:52:26,793 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016037: Could not find new XAResource to use for recovering non-serializable XAResource XAResourceRecord < resource:null, txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:4b4d25df:5137004f:8, node_name=1, branch_uid=0:ffff7f000101:4b4d25df:5137004f:9, subordinatenodename=null, eis_name=unknown eis name >, heuristic: TwoPhaseOutcome.FINISH_OK com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@1cf15d7 >
09:52:26,795 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016038: No XAResource to recover < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:4b4d25df:5137004f:8, node_name=1, branch_uid=0:ffff7f000101:4b4d25df:5137004f:9, subordinatenodename=null, eis_name=unknown eis name >
What's wrong?
My datasource is configured as follows:
<subsystem xmlns="urn:jboss:domain:datasources:1.1"> <datasources> <xa-datasource jndi-name="java:/jdbc/myDS" pool-name="myDS" enabled="true" use-ccm="false"> <xa-datasource-property name="ServerName"> localhost </xa-datasource-property> <xa-datasource-property name="PortNumber"> 5432 </xa-datasource-property> <xa-datasource-property name="DatabaseName"> my </xa-datasource-property> <driver>postgresql-jdbc4</driver> <xa-pool> <min-pool-size>1</min-pool-size> <max-pool-size>20</max-pool-size> <prefill>true</prefill> <is-same-rm-override>false</is-same-rm-override> <interleaving>false</interleaving> <pad-xid>false</pad-xid> <wrap-xa-resource>true</wrap-xa-resource> </xa-pool> <security> <user-name>my</user-name> <password>my</password> </security> <recovery> <recover-credential> <user-name>my</user-name> <password>my</password> </recover-credential> </recovery> <validation> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> <background-validation-millis>1</background-validation-millis> </validation> <statement> <prepared-statement-cache-size>0</prepared-statement-cache-size> <share-prepared-statements>false</share-prepared-statements> </statement> </xa-datasource> <drivers> <driver name="postgresql-jdbc4" module="org.postgresql"> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> </driver> </drivers> </datasources> </subsystem>
My pooled-connection-factory for HornetQ (used to send message from app) is as follows:
<subsystem xmlns="urn:jboss:domain:messaging:1.2"> <hornetq-server> <persistence-enabled>false</persistence-enabled> <connectors> <connector name="remote-jmsxa1"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <param key="host" value="localhost" /> <param key="port" value="5445" /> </connector> </connectors> <jms-connection-factories> <connection-factory name="dummyCF"> <connectors> <connector-ref connector-name="remote-jmsxa1" /> </connectors> <entries> <entry name="java:/jms/dummyCF" /> </entries> </connection-factory> <pooled-connection-factory name="hornetq-ra"> <transaction mode="xa" /> <connectors> <connector-ref connector-name="remote-jmsxa1" /> </connectors> <entries> <entry name="java:/JmsXA" /> </entries> </pooled-connection-factory> </jms-connection-factories> <jms-destinations> <jms-queue name="ADLQ"> <entry name="java:/queue/ADLQ" /> </jms-queue> </jms-destinations> </hornetq-server> </subsystem>
My MDB activation spec is:
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/AQueue"), @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"), @ActivationConfigProperty(propertyName = "setupAttempts", propertyValue = "-1"), @ActivationConfigProperty(propertyName = "setupInterval", propertyValue = "5000"), @ActivationConfigProperty(propertyName = "reconnectAttempts", propertyValue = "-1"), @ActivationConfigProperty(propertyName = "retryInterval", propertyValue = "1000"), @ActivationConfigProperty(propertyName = "retryIntervalMultiplier", propertyValue = "2"), @ActivationConfigProperty(propertyName = "maxRetryInterval", propertyValue = "8000"), @ActivationConfigProperty(propertyName = "clientID", propertyValue = "my"), @ActivationConfigProperty(propertyName = "hA", propertyValue = "true"), @ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=localhost;port=5445) })
PostgreSQL is configured to support distributed transactions (max_prepared_transactions equals to max_connections).
Any help will be appreciated.