Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-4

A-MQ amqp jms client can not failover to other broker

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None
    • documentation, qpid-jms
    • None
    • Compatibility/Configuration, User Experience
    • Hide

      Here's the setting:
      IP1, IP2 are running brokers
      IP3 does not have a running broker

      And this is the quick scenario:
      1) Send a message to broker on IP1
      15:43:57,439 DEBUG Connection=amqp://admin:admin@IP1?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4'
      {'redelivered': False, 'reply_to': None, 'id': 'panther-34269-1432561437582-0:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1432561438327, 'properties':

      {'JMSXDeliveryCount': 1}

      , 'content': None}

      Process finished with exit code 0

      2) Send a message to broker on IP2
      16:35:28,179 DEBUG Connection=amqp://admin:admin@IP2?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4'
      {'redelivered': False, 'reply_to': None, 'id': 'panther-34825-1432561483225-0:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1432561483958, 'properties':

      {'JMSXDeliveryCount': 1}

      , 'content': None}

      Process finished with exit code 0

      3) Send a message to broker on IP3 (failover should happen)
      16:39:57,671 DEBUG Connection=amqp://admin:admin@IP3?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4'
      16:39:59,372 ERROR Failed to create JMS Provider instance for: amqp
      16:39:59,373 ERROR No route to host
      javax.jms.JMSException: No route to host
      at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:77)
      at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:183)
      at com.redhat.mqe.jms.ConnectionManager.<init>(ConnectionManager.java:86)
      at com.redhat.mqe.jms.CoreClient.createConnection(CoreClient.java:72)
      at com.redhat.mqe.jms.SenderClient.startClient(SenderClient.java:48)
      at com.redhat.mqe.jms.aac1_sender.main(aac1_sender.java:36)
      Caused by: java.net.NoRouteToHostException: No route to host
      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
      at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:191)
      at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:279)
      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
      at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
      at java.lang.Thread.run(Thread.java:745)

      Show
      Here's the setting: IP1, IP2 are running brokers IP3 does not have a running broker And this is the quick scenario: 1) Send a message to broker on IP1 15:43:57,439 DEBUG Connection=amqp://admin:admin@IP1?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4' {'redelivered': False, 'reply_to': None, 'id': 'panther-34269-1432561437582-0:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1432561438327, 'properties': {'JMSXDeliveryCount': 1} , 'content': None} Process finished with exit code 0 2) Send a message to broker on IP2 16:35:28,179 DEBUG Connection=amqp://admin:admin@IP2?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4' {'redelivered': False, 'reply_to': None, 'id': 'panther-34825-1432561483225-0:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1432561483958, 'properties': {'JMSXDeliveryCount': 1} , 'content': None} Process finished with exit code 0 3) Send a message to broker on IP3 (failover should happen) 16:39:57,671 DEBUG Connection=amqp://admin:admin@IP3?brokerlist='amqp://IP2?retries='2';amqp://IP1;'&heartbeat='2'&failover='roundrobin'&retries='4' 16:39:59,372 ERROR Failed to create JMS Provider instance for: amqp 16:39:59,373 ERROR No route to host javax.jms.JMSException: No route to host at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:77) at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:183) at com.redhat.mqe.jms.ConnectionManager.<init>(ConnectionManager.java:86) at com.redhat.mqe.jms.CoreClient.createConnection(CoreClient.java:72) at com.redhat.mqe.jms.SenderClient.startClient(SenderClient.java:48) at com.redhat.mqe.jms.aac1_sender.main(aac1_sender.java:36) Caused by: java.net.NoRouteToHostException: No route to host at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:191) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:279) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) at java.lang.Thread.run(Thread.java:745)

      I am trying to do a simple failover for amqp jms client.

            tbish@redhat.com Timothy Bish (Inactive)
            mtoth@redhat.com Michal Toth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: