Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1138112

Summary: [GSS] (6.4.z) Core bridge hangs on a fresh server installation
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tyronne Wickramarathne <tywickra>
Component: HornetQAssignee: Yong Hao Gao <hgao>
Status: CLOSED NOTABUG QA Contact: Miroslav Novak <mnovak>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.0, 6.3.0CC: ataylor, csuconic, istudens, jbertram, mnovak, msvehla
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-11 14:41:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
coreb.xml none

Description Tyronne Wickramarathne 2014-09-04 06:07:35 UTC
Description of problem:

HornetQ's core bridge hangs on a fresh server installation, as it gets deployed ahead of the destination configuration. This causes HornetQ's core bridge to hang irrespective to its retry attempt configuration 

Version-Release number of selected component (if applicable):
JBoss-EAP-6.2, HornetQ-2.3.12
JBoss-EAP-6.3  HornetQ-2.3.20


How reproducible:


Steps to Reproduce:
1. Please configure two JBoss-EAP-6.2 server instances, ServerA and ServerB
2. Configure a destination, queue/A in ServerA and queue/B in ServerB
3. Configure a core bridge in ServerA, to move messages from queue/A to queue/B
4. Please make sure to delete the "data" directory in ServerA if it exists
5. Start ServerB and then ServerA
6. The core bridge gets hanged as it gets deployed ahead of the destination creation (queue/A in ServerA)
7. This issue disappears during subsequent server starts without deleting the "data" directory. 

Additional info:
I have tried this in JBoss-EAP-6.3-GA and the problem still persists in this release.

Comment 1 Tyronne Wickramarathne 2014-09-04 06:08:49 UTC
Created attachment 934270 [details]
coreb.xml

Attached the core bridge configuration

Comment 2 Miroslav Novak 2014-10-30 08:11:23 UTC
I'm setting flags for EAP 6.4.0 so we don't loose this from focus. If this is required to have in EAP 6.2.x.CP or 6.3.x.CP then new bz must be created and discussed with PM.

Comment 3 Yong Hao Gao 2015-01-08 14:39:26 UTC
Hi Mirek and Tyronne,

I wonder if this is a valid case. My reason is that this test uses a core bridge that points to a configured jms source queue, which seems not right because hornetq core stuff shouldn't be depending on jms stuff.

I think the correct test is that the core bridge only references core queues, thus, for this test to be valid, you need a core queue "jms.queue.A" configured.

What's your thoughts?


Howard

Comment 4 Miroslav Novak 2015-01-08 15:05:31 UTC
Hi Howard,

I've taken a look at attached xml and there are used core name of the queues in configuration of core bridge:

...
<bridge name="notification-queue-bridge">
   <queue-name>jms.queue.A</queue-name>
   <forwarding-address>jms.queue.B</forwarding-address>
...

Thanks,
Mirek

Comment 5 Miroslav Novak 2015-01-08 15:10:39 UTC
I think you've just pointed out a usability problem. You're right that HornetQ is using core names for configuration of core bridges and in EAP 6 queues are defined like:

<jms-queue name="A">
   <entry name="queue/A"/>
   <entry name="jboss/exported/queue/A"/>
</jms-queue>

and bridges like:
...
<bridge name="notification-queue-bridge">
   <queue-name>jms.queue.A</queue-name>
   <forwarding-address>jms.queue.B</forwarding-address>
...

It's not intuitive for admins/users to use "jms.queue.A" in configuration of core bridge when name of the queue was defined just "A".

Comment 6 Yong Hao Gao 2015-01-08 15:18:02 UTC
Hi Mirek,

Any jms queue will cause a corresponding core queue to be deployed, its name is just the jms queue name prefixed with jms.queue. The problem is that core bridge will always start before any jms artifacts are deployed.

The core bridge refers to a core queue, not a jms queue. For it to work you need add a core queue in the config, i.e.

<core-queues>
    <queue name="jms.queue.A">
        <address>jms.queue.A</address>
    </queue>
</core-queues>


Thanks
Howard

Comment 7 Miroslav Novak 2015-01-08 16:16:15 UTC
Hi Howard,

I understand. But with this we force users to have one destination twice in the configuration if they wish to have one queue for core bridge and also to have defined JNDI entry for JMS clients to lookup it in <jms-queue>. We should try to simplify it. 

Thanks,
Mirek

Comment 8 Justin Bertram 2015-01-08 18:04:07 UTC
Core bridges require core queues.  A JMS queue uses a core queue under-the-covers but it's defined differently because its use-case is different from a core queue.  If the user doesn't want to define a core queue which corresponds to their JMS queue to use with a core bridge then they can simply use a JMS bridge.

Comment 9 Yong Hao Gao 2015-01-09 02:50:04 UTC
+1 Justin.

Mirek we can't make core-bridge depends on jms stuff. Core bridge works with core queues, Jms bridge works with jms queues.

Howard

Comment 10 Miroslav Novak 2015-01-09 09:32:42 UTC
Ok, I understand that making core bridge dependent on JMS stuff is not the right way. But is it possible to retry deployment of the core bridge so it succeeds eventually? Similarly as it's retried deployment of JMS bridges.

Mirek

Comment 11 Yong Hao Gao 2015-01-09 12:15:37 UTC
Hi Mirek,

Yes it is possible, but as I said, the overall design is that the core has nothing dependent on jms. Rather the jms depends on core for its functionalities. So the core services are starting first and then JMS services.

So if we want the core bridge to retry, we need to allow JMS service to be activated even if the core service (bridge) is not fully started yet, which means we will have core to be dependent on jms, which I don't think is a good idea.


Howard

Comment 12 Miroslav Novak 2015-01-09 12:47:45 UTC
Hi Howard,

at this moment if core bridge fails to be deployed then jms service starts anyway. I don't think that with retrying core bridge we'd make it dependent on jms.

Mirek

Comment 13 Yong Hao Gao 2015-01-09 13:10:28 UTC
Hi Mirek,

Core bridge does have retry in place, but the checking of the source queue is done before the bridge is started. This is because if the bridge find its source queue is not there, there is no point to retry for that purpose.

Howard

Comment 14 Miroslav Novak 2015-01-09 14:22:11 UTC
Hi Howard,

would it be possible to retry deploy of core bridge when something in hornetq core changes? In this case jms queue is deployed later and causes that core queue is deployed. Can this trigger hornetq bridge redeployment? We would bind redeployment of core bridge to change in hornetq core.

Mirek

Comment 15 Clebert Suconic 2015-02-16 05:32:51 UTC
Core bridges should be startes after the JMS queue is crested. Although um not sure why it's hunging

Comment 16 Yong Hao Gao 2015-02-16 08:10:12 UTC
Hi Clebert,

I didn't see any specific hanging in the test, it may just appears so as the bridge wan't get deployed due to this exception.

Howard

Comment 18 Clebert Suconic 2015-06-11 14:41:24 UTC
I will close this as not a bug. If the user wants a core-bridge, he can just define the core-queue