Bug 1021389 - JMS bridge can't connect to "target" server
JMS bridge can't connect to "target" server
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ, JMS (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Clebert Suconic
Miroslav Novak
Russell Dickenson
Depends On:
  Show dependency treegraph
Reported: 2013-10-21 04:26 EDT by Miroslav Novak
Modified: 2013-12-15 08:33 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-21 06:30:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
conf.zip (11.01 KB, application/zip)
2013-10-21 04:26 EDT, Miroslav Novak
no flags Details

  None (edit)
Description Miroslav Novak 2013-10-21 04:26:51 EDT
Created attachment 814459 [details]

Description of problem:

Test scenario:
1. Start "source" server with deployed queue InQueue and JMS bridge
2. Start "target" server with deployed queue OutQueue
- JMS bridge deployed on "source" server sends messages from "InQueue" (from "source" server) to "OutQueue" (to "target" server)

Sometimes there are exceptions in log of "source" server like (JMS bridge does not connect):

10:14:20,552 INFO  [org.hornetq.jms.server] (pool-4-thread-1) HQ121000: Failed to set up JMS bridge connections. Most probably the source or target servers are unavailable. Will retry after a pause of 1,000 ms
10:14:21,553 WARN  [org.hornetq.jms.server] (pool-4-thread-1) HQ122010: Failed to connect JMS Bridge: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "org.jboss.as.clustering.common:main" from local module loader @3b75078b (finder: local module finder @42552c (roots: /home/jbossqa/hornetq_eap6_testsuite/eap6.2.0.ER6/server1/jboss-eap-6.2/modules,/home/jbossqa/hornetq_eap6_testsuite/eap6.2.0.ER6/server1/jboss-eap-6.2/modules/system/layers/base))
	at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664) [rt.jar:1.6.0_38]
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [rt.jar:1.6.0_38]
	at javax.naming.InitialContext.init(InitialContext.java:223) [rt.jar:1.6.0_38]
	at javax.naming.InitialContext.<init>(InitialContext.java:197) [rt.jar:1.6.0_38]
	at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:55)
	at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:40)
	at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1224)
	at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1460)
	at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2000(JMSBridgeImpl.java:83)
	at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2049)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

Configuration of JMS bridge:

<jms-bridge name="myBridge">
                    <connection-factory name="java:/ConnectionFactory"/>
                    <destination name="jms/queue/InQueue"/>
                    <connection-factory name="jms/RemoteConnectionFactory"/>
                    <destination name="jms/queue/OutQueue"/>
                        <property key="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/>
                        <property key="java.naming.provider.url" value="remote://"/>

Attaching configuration from "source" and "target" server. (conf.zip)
Comment 1 Miroslav Novak 2013-10-21 04:31:54 EDT
This problem occurs often and there is high risk that customer will hit it.
Comment 2 Jeff Mesnil 2013-10-21 04:57:33 EDT
From the configuration it looks like HornetQ is the JMS implementation for both the jms-bridge target and source.

Does the problem also occur if the jms-bridge configuration explicitly state to use the org.hornetq module to load the JMS bridge:

<jms-bridge module="org.hornetq">
Comment 3 Miroslav Novak 2013-10-21 06:29:27 EDT
With module="org.hornetq" I can't hit it again. I'll update bz#999344 to document it and close this bz. Thanks Jeff for help!

Note You need to log in before you can comment on or make changes to this bug.