Problem sending messages from MDB on failover
radhikasivaraj Jan 28, 2010 7:14 AMHi, I have an issue sending messages from MDB on failover.
Version: HornetQ GA, JBoss 5.1.0
I have two queues (requestQ, responseQ) in queue node1 and node2 is configured as backup for node1. MDB is deployed in node 3 and is not part of the cluster.
When node1 is active, I'm able to send messages to requestQ of node1 and mdb picks the message from requestQ, process and sends a reply message to responseQ of node1, all went fine.
When node1 crashes, backup node (node2) got activated and sender application was able to send messages to requestQ (of node1 and in turn to backup node2) and mdb also picked the message from node2, but then the MDB is unable to send the reply message to responseQ of node2. Pls see below for the exception that i get on failover.
16:20:04,082 WARN [ChannelImpl] Can't find packet to clear: last received command id 9 first stored command id 0 16:20:54,591 WARN [RemotingConnectionImpl] Connection failure has been detected: Did not receive ping from /172.18.10.7:1446. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. The connection will now be closed. [code=3] 16:20:54,606 WARN [ServerSessionImpl] Client connection failed, clearing up resources for session 6e41324b-0bfa-11df-9152-001c23457f19 16:20:54,622 ERROR [ServerSessionImpl] Failed to close connection org.hornetq.core.server.impl.ServerSessionImpl@1f06283
I could see from log that the mdb picks the request message but unable to send the reply message. I dont see this line of code getting executed on / after failover.
conn = connectionFactory.createConnection();
16:21:38,737 INFO [STDOUT] m1-1 sent to q1 consumed by mdb : 1
16:21:38,737 INFO [STDOUT] About to send the response message
16:26:38,883 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -53edf57b:82e:4b616b18:1b in state RUN
16:26:38,883 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -53edf57b:82e:4b616b18:1b invoked while multiple threads active within it.
16:26:38,883 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -53edf57b:82e:4b616b18:1b aborting with 1 threads active!
16:26:39,211 INFO [STDOUT] m1-1 sent to q1 consumed by mdb : 1
16:26:39,211 INFO [STDOUT] About to send the response message
16:26:39,383 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -53edf57b:82e:4b616b18:1b in state CANCEL
16:26:39,884 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -53edf57b:82e:4b616b18:1b in state CANCEL_INTERRUPTED
16:26:39,884 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_6] - TransactionReaper::check worker Thread[Thread-15,5,jboss] not responding to interrupt when cancelling TX -53edf57b:82e:4b616b18:1b -- worker marked as zombie and TX scheduled for mark-as-rollback
16:26:39,884 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_11] - TransactionReaper::check failed to mark TX -53edf57b:82e:4b616b18:1b as rollback only
16:26:48,888 WARN [ClientConsumerImpl] Timed out waiting for handler to complete processing
16:26:58,893 WARN [ClientConsumerImpl] Timed out waiting for handler to complete processing
I took the sample code from jca-config example of Hornetq distribution for sending messages from MDB but then the same code does not work in case of failover even after adding relevant params in ra.xml/ remote-jms-ds.xml. Am I missing anything?
Attached is the MDB code, hornetq-configuration.xml, ra.xml and remote-jms-ds.xml of node3. Pls help
-
files.zip 5.1 KB