activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Sussman (JIRA)" <>
Subject [jira] Created: (AMQ-3124) Failover transport client gets corrupted connectedBrokers data
Date Sat, 08 Jan 2011 01:59:46 GMT
Failover transport client gets corrupted connectedBrokers data 

                 Key: AMQ-3124
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.2
            Reporter: Adam Sussman

When clients use the Failover transport, the broker will deliver a list of brokers it peers
with to the client.  This happens on initial connection and, if configured, as brokers come
in and out of the cluster.

The problem is that the entire URI is given, including query string information.  If the query
string contains commas in it then the Failover client breaks it up into unusable client uris
and will attempt to connect to them.  Also, in 5.4.2, this leads to the same failure that
occurs in AMQ-3085.

Also, there doesn't seem to be a point in the client trying to use the same query string parameters
that the server is using.

Attached patch strips the query string before sending uris to the client.




             <networkConnector name="core1" uri="static:(ssl://broker1:61616)" duplex="true"

            <transportConnector name="openwire+ssl" uri="ssl://"

With a client connecting to:  failover:(ssl://broker2:61616), you will see (extra debugging
added by me):

[DEBUG] FailoverTransport - Failover add: u[0] is: ssl://broker2:61616
[DEBUG] FailoverTransport - Reconnect was triggered but transport is not started yet. Wait
for start to connect the transport.
[DEBUG] FailoverTransport - Started.
[DEBUG] FailoverTransport - Waking up reconnect task
[DEBUG] FailoverTransport - urlList connectionList:[ssl://broker2:61616]
[DEBUG] FailoverTransport - Attempting connect to: ssl://broker2:61616
[DEBUG] FailoverTransport - Failover add: u[0] is: TLS_RSA_WITH_AES_256_CBC_SHA
[DEBUG] FailoverTransport - Failover add: u[1] is: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
[DEBUG] FailoverTransport - Failover add: u[2] is: TLS_RSA_WITH_AES_128_CBC_SHA
[DEBUG] FailoverTransport - Failover add: u[3] is: TLS_DHE_RSA_WITH_AES_128_CBC_SHA
[DEBUG] FailoverTransport - Failover add: u[4] is: ssl://broker2:61616?needClientAuth=true&enabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA
[DEBUG] FailoverTransport - Failover add: u[5] is: TLS_DHE_DSS_WITH_AES_128_CBC_SHA
[DEBUG] FailoverTransport - Failover add: u[6] is: ssl://broker1:61616?needClientAuth=true
[WARN] FailoverTransport - Transport (broker2/ failed to ssl://broker2:61616
, attempting to automatically reconnect due to: Unexpected error occured
[DEBUG] FailoverTransport - Transport failed with the following exception: <
Unexpected error occured> Unexpected error occured
	at org.apache.activemq.transport.failover.FailoverTransport.add(
	at org.apache.activemq.transport.failover.FailoverTransport.updateURIs(
	at org.apache.activemq.transport.failover.FailoverTransport.processNewTransports(
	at org.apache.activemq.transport.failover.FailoverTransport.handleConnectionControl(
	at org.apache.activemq.transport.failover.FailoverTransport$3.onCommand(
[DEBUG] FailoverTransport - urlList connectionList:[TLS_RSA_WITH_AES_256_CBC_SHA, ssl://broker2:61616]
[DEBUG] FailoverTransport - Attempting connect to: TLS_RSA_WITH_AES_256_CBC_SHA
[DEBUG] FailoverTransport - Connect fail to: TLS_RSA_WITH_AES_256_CBC_SHA, reason:
Transport not scheme specified: [TLS_RSA_WITH_AES_256_CBC_SHA]
[DEBUG] FailoverTransport - Attempting connect to: ssl://broker2:61616
[DEBUG] FailoverTransport - Connection established
[INFO] FailoverTransport - Successfully reconnected to ssl://broker2:61616

Note that the stacktrace occurs for the same reason as AMQ-3085, but all the extra work attempting
to connect to invalid uris is wasteful.  Also, the client has no need for the query string
parameters of the server uris.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message