Bug 950274 - Remote HornetQ with <local-bind-address> uses wrong bind address
Summary: Remote HornetQ with <local-bind-address> uses wrong bind address
Keywords:
Status: ASSIGNED
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBoss HornetQ
Version: 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rick Wagner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-10 01:25 UTC by James Livingston
Modified: 2018-12-01 16:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 922983
Environment:
Last Closed:
Type: Support Patch
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker HORNETQ-1147 0 Major Resolved Client tries to use local-bind-address when using JMS connection factory from JNDI 2016-03-28 14:59:46 UTC
Red Hat Knowledge Base (Solution) 228013 0 None None None Never

Description James Livingston 2013-04-10 01:25:40 UTC
+++ This bug was initially created as a clone of Bug #922983 +++

When accessing a remote HornetQ factory and the discovery group has <local-bind-address> set, HornetQ will attempt to use the bind address set in the remote server's configuration rather than it's own address.

This will fail with errors like the following, because the kernel will not let you use an IP address that does not belong to a local interface
java.net.SocketException: Cannot assign requested address
        at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)
        at java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:299)
        at java.net.MulticastSocket.setInterface(MulticastSocket.java:448)
        at org.hornetq.core.cluster.impl.DiscoveryGroupImpl.start(DiscoveryGroupImpl.java:149)
        at org.hornetq.core.client.impl.ServerLocatorImpl.initialise(ServerLocatorImpl.java:380)
        at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:716)
        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601)
        at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:155)
        at org.hornetq.jms.client.HornetQConnectionFactory.createXAConnection(HornetQConnectionFactory.java:150)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$JmsSessionPool.initConnection(JmsConnectionPool.java:822)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$JmsSessionPool.getSession(JmsConnectionPool.java:761)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.internalGetSession(JmsConnectionPool.java:264)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:206)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.getJmsSession(JmsCourier.java:165)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.createMessageProducer(JmsCourier.java:397)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.internalDeliver(JmsCourier.java:215)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.deliver(JmsCourier.java:187)
        at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.deliver(TwoWayCourierImpl.java:189)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.messageTo(ActionProcessingPipeline.java:897)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.replyTo(ActionProcessingPipeline.java:819)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:748)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:614)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)
        at org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
        at org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:210)
        at org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:271)
        at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:163)
        at sun.proxy.$Proxy591.onMessage(Unknown Source)
        at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:311)
        at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1028)
        at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:50)
        at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1173)
        at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)

--- Additional comment from JBoss JIRA Server on 2013-03-22 01:46:18 EST ---

Justin Bertram <jbertram> updated the status of jira HORNETQ-1147 to Resolved

--- Additional comment from James Livingston on 2013-03-22 08:07:06 EST ---

EAP 5 changes are at https://github.com/hornetq/hornetq/pull/947

Comment 1 Rick Wagner 2013-04-10 14:50:24 UTC
Productisation:  Please apply the fix found at [1] to our version of HQ.

Please ping Rick with any questions.  Thank you!

[1] https://github.com/hornetq/hornetq/pull/947/files


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