Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-7876

[LTS] The client doesn't failover to the backup server if the URL targets non clustered ports.

XMLWordPrintable

    • False
    • False
    • -
    • Hide
      • Then start a core client and specify an HA URL that doesn't target the ports specified in the static connectors
      • Stop the active broker and let it failover.
      • Notice that the client always retries at the last active URL and doesn't try the other URL for the passive broker.
      
      url = "(tcp://localhost:61617,tcp://localhost:61619)?ha=true;reconnectAttempts=3"
      
      [ctiveMQ-client-global-threads)] client                         WARN  AMQ212037: Connection failure to localhost/127.0.0.1:61617 has been detected: AMQ219015: The connection was disconnected because of server shutdown [code=DISCONNECTED]
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying reconnection attempt 0/3
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name=null, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha=true&useTopologyForLoadBalancing=false
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] using native epoll
      [ctiveMQ-client-global-threads)] client                         DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Remote destination: localhost/127.0.0.1:61617
      [ActiveMQ-client-netty-threads)] NettyConnector                 DEBUG Added ActiveMQClientChannelHandler to Channel with id = 557dff53 
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] failed
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Backup is not active, trying original connection configuration now.
      [ctiveMQ-client-global-threads)] ClientSessionImpl              DEBUG client ack messageID = 25769804383
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying reconnection attempt 1/3
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name=null, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha=true&useTopologyForLoadBalancing=false
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] using native epoll
      [ctiveMQ-client-global-threads)] client                         DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Remote destination: localhost/127.0.0.1:61617
      [ActiveMQ-client-netty-threads)] NettyConnector                 DEBUG Added ActiveMQClientChannelHandler to Channel with id = f217195d 
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] failed
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Backup is not active, trying original connection configuration now.
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying reconnection attempt 2/3
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name=null, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha=true&useTopologyForLoadBalancing=false
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] using native epoll
      [ctiveMQ-client-global-threads)] client                         DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617
      [ctiveMQ-client-global-threads)] NettyConnector                 DEBUG Remote destination: localhost/127.0.0.1:61617
      [ActiveMQ-client-netty-threads)] NettyConnector                 DEBUG Added ActiveMQClientChannelHandler to Channel with id = c914b444 
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] failed
      [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl       DEBUG Backup is not active, trying original connection configuration now.
      [ctiveMQ-client-global-threads)] client                         WARN  AMQ212005: Tried 3 times to connect. Now giving up on reconnecting it.
      [ctiveMQ-client-global-threads)] ClientSessionImpl              DEBUG calling cleanup on ClientSessionImpl [name=b9a295f2-5cec-11ec-a60c-28d0ea5d41d9, username=admin, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@79b06cab, metaData=(jms-session=,)]@1807f5a7
      [ctiveMQ-client-global-threads)] client                         WARN  AMQ212002: Timed out waiting for handler to complete processing
      [ctiveMQ-client-global-threads)] ClientSessionImpl              DEBUG calling cleanup on ClientSessionImpl [name=b9aad353-5cec-11ec-a60c-28d0ea5d41d9, username=admin, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@79b06cab, metaData=(jms-session=,)]@2584b82d
      
      Show
      Start 2 brokers with a configuration like this: https://github.com/avi5kdonrh/Issues/blob/main/broker_active.xml https://github.com/avi5kdonrh/Issues/blob/main/broker_passive.xml Then start a core client and specify an HA URL that doesn't target the ports specified in the static connectors Stop the active broker and let it failover. Notice that the client always retries at the last active URL and doesn't try the other URL for the passive broker. url = "(tcp: //localhost:61617,tcp://localhost:61619)?ha= true ;reconnectAttempts=3" [ctiveMQ-client-global-threads)] client WARN AMQ212037: Connection failure to localhost/127.0.0.1:61617 has been detected: AMQ219015: The connection was disconnected because of server shutdown [code=DISCONNECTED] [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying reconnection attempt 0/3 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name= null , factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha= true &useTopologyForLoadBalancing= false [ctiveMQ-client-global-threads)] NettyConnector DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] using native epoll [ctiveMQ-client-global-threads)] client DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617 [ctiveMQ-client-global-threads)] NettyConnector DEBUG Remote destination: localhost/127.0.0.1:61617 [ActiveMQ-client-netty-threads)] NettyConnector DEBUG Added ActiveMQClientChannelHandler to Channel with id = 557dff53 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] failed [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Backup is not active, trying original connection configuration now. [ctiveMQ-client-global-threads)] ClientSessionImpl DEBUG client ack messageID = 25769804383 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying reconnection attempt 1/3 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name= null , factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha= true &useTopologyForLoadBalancing= false [ctiveMQ-client-global-threads)] NettyConnector DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] using native epoll [ctiveMQ-client-global-threads)] client DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617 [ctiveMQ-client-global-threads)] NettyConnector DEBUG Remote destination: localhost/127.0.0.1:61617 [ActiveMQ-client-netty-threads)] NettyConnector DEBUG Added ActiveMQClientChannelHandler to Channel with id = f217195d [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] failed [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Backup is not active, trying original connection configuration now. [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying reconnection attempt 2/3 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@3eb7fc54, connectorConfig=TransportConfiguration(name= null , factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61617&host=localhost&reconnectAttempts=3&ha= true &useTopologyForLoadBalancing= false [ctiveMQ-client-global-threads)] NettyConnector DEBUG Connector NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] using native epoll [ctiveMQ-client-global-threads)] client DEBUG AMQ211002: Started EPOLL Netty Connector version 4.1.48.Final-redhat-00001 to localhost:61617 [ctiveMQ-client-global-threads)] NettyConnector DEBUG Remote destination: localhost/127.0.0.1:61617 [ActiveMQ-client-netty-threads)] NettyConnector DEBUG Added ActiveMQClientChannelHandler to Channel with id = c914b444 [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Connector towards NettyConnector [host=localhost, port=61617, httpEnabled= false , httpUpgradeEnabled= false , useServlet= false , servletPath=/messaging/ActiveMQServlet, sslEnabled= false , useNio= true ] failed [ctiveMQ-client-global-threads)] ClientSessionFactoryImpl DEBUG Backup is not active, trying original connection configuration now. [ctiveMQ-client-global-threads)] client WARN AMQ212005: Tried 3 times to connect. Now giving up on reconnecting it. [ctiveMQ-client-global-threads)] ClientSessionImpl DEBUG calling cleanup on ClientSessionImpl [name=b9a295f2-5cec-11ec-a60c-28d0ea5d41d9, username=admin, closed= false , factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@79b06cab, metaData=(jms-session=,)]@1807f5a7 [ctiveMQ-client-global-threads)] client WARN AMQ212002: Timed out waiting for handler to complete processing [ctiveMQ-client-global-threads)] ClientSessionImpl DEBUG calling cleanup on ClientSessionImpl [name=b9aad353-5cec-11ec-a60c-28d0ea5d41d9, username=admin, closed= false , factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@79b06cab, metaData=(jms-session=,)]@2584b82d

      Assumption:

      • There are 2 HA brokers and they each have multiple acceptors that allow the Core protocol.
      • They are clustered with static connectors.

      If the client uses port that is not specified in the static-connectors (i.e. (tcp://active:port1,tcp:passive:port1)ha=true
      It doesn't failover when the active broker is killed and the backup takes over.

              dbruscin Domenico Francesco Bruscino
              rhn-support-adongre Avinash Dongre
              Tiago Bueno Tiago Bueno
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: