7 Replies Latest reply on Dec 9, 2015 9:55 AM by jbertram

    HornetQ bound to all interfaces (0.0.0.0) - unable to setup JMS bridge in this way between two 'Wildfly-8.2.1Final' instances

    branku

      Hello,

       

      in my scenario a new IP is assigned to a server when it becomes a primary one ( in our failover solution ).

      Clients ( JMS bridges in this case ) use this 'new IP' to connect to whatever server is a primary one to establish this JMS bridge. ( <jms-bridge> contains this 'new IP' ).

       

      However,  since the server does not have this IP when it is starting ( as it is a fail-over server ), I cannot bind HornetQ to listen on this address.

      I tried make it listen on "0.0.0.0", but in this way JMS bridge cannot be established for some reason, although I can see the communication attempts.

       

      JMS bridge client:

       

      2015-12-08 09:54:21,631 INFO  [org.hornetq.jms.server] (pool-3-thread-3) 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

      2015-12-08 09:54:52,944 WARN  [org.hornetq.jms.server] (pool-3-thread-3) HQ122010: Failed to connect JMS Bridge: javax.jms.JMSException: Failed to create session factory

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:673) [hornetq-jms-client-2.4.5.Final.jar:]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:112) [hornetq-jms-client-2.4.5.Final.jar:]

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.createConnection(JMSBridgeImpl.java:1141) [hornetq-jms-server-2.4.5.Final.jar:]

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1337) [hornetq-jms-server-2.4.5.Final.jar:]

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1471) [hornetq-jms-server-2.4.5.Final.jar:]

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2200(JMSBridgeImpl.java:76) [hornetq-jms-server-2.4.5.Final.jar:]

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2079) [hornetq-jms-server-2.4.5.Final.jar:]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]

      Caused by: HornetQNotConnectedException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]

              at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:905) [hornetq-core-client-2.4.5.Final.jar:]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:669) [hornetq-jms-client-2.4.5.Final.jar:]

              ... 9 more


      JMS bridge server:

       

      2015-12-08 10:10:29,199 INFO  [org.jboss.as.naming] (default task-10) JBAS011806: Channel end notification received, closing channel Channel ID 3ad9049a (inbound) of Remoting connection 57b327d8 to /192.168.103.31:34485

       

       

      When I bind HornetQ subsystem to specific 192.168.*.* address everything works great.

       

      Can anyone please think of a workaround or why exactly it is that HornetQ is unable to work with 0.0.0.0 correctly? Please note that I am not limited to using http communication if that is the source of the problem.

       

      ( I am 'jms bridging' identical wildfly server versions - 8.2.1.Final ). Configurations are identical, apart from the <jms-bridge> part, where IP addresses differ - both addresses are these 'new IP' or virtual IPs.

       

      Many thanks,

      b.