You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by j0llyr0g3r <ti...@wincor-nixdorf.com> on 2007/10/16 13:30:26 UTC

Network of Broker: Auto-failover -> How to prefix the URI correctly? static?

Hey folks,

imagine the following situation:

- One AMQ-Cluster called Cluster_1 consisting of host A1 and A2.
- One AMQ-Cluster called Cluster_2 consisting of host B1 and B2.

Both clusters work on their own shared memory segment.

Now host A1 and A2 from Cluster_1 connect to the hosts from Cluster_2 via:

    <networkConnectors>
      <networkConnector name="remote_ssl_1"
uri="static://(ssl://B1:61617,ssl://B2:61627)" />
    </networkConnectors>

And the hosts B1 and B2 from Cluster_2 connect to the hosts from Cluster_1
accordingly:

    <networkConnectors>
      <networkConnector name="remote_ssl"
uri="static://(ssl://A1:61617,ssl://A2:61627)" />
    </networkConnectors>

Now this works fine so far, but there is something annoying about it:

Consider i start all hosts from Cluster_1 and Cluster_2.
Let's say A1 from Cluster_1 is master and B1 from Cluster_2 is master then i
get the following output via console from both masters:

ERROR TransportConnector             - Could not accept connection :
org.apache.activemq.transport.TransportDisposedIOException: Peer
(vm://localhost#200) disposed.
org.apache.activemq.transport.TransportDisposedIOException: Peer
(vm://localhost#200) disposed.
        at
org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:87)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
        at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:59)
        at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1178)
        at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:797)
        at
org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:878)
        at
org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:152)

Now where does this error come from? 

Why is there something like "vm://localhost" at all (nothing like that in my
configs)?

I believe it has something to do with the prefix "static" of the URI:

uri="static://(ssl://A1:61617,ssl://A2:61627)"

Meaning host A1 tries to establish a connection to host B1 and B2.
Now the connection to B2 fails of course scince B2 is the slave currently.

As i said, the failover works and messages are transmitted.
But how do i get rid of this error?

Using a URI with failover-prefix like:

uri="failover://(ssl://A1:61617,ssl://A2:61627)"

doesn't work scince brokers do an auto-failover.

But obviously, i should improve my configuration.

Could anybody please point out what's going wrong here?

-- 
View this message in context: http://www.nabble.com/Network-of-Broker%3A-Auto-failover--%3E-How-to-prefix-the-URI-correctly--static--tf4633603s2354.html#a13231373
Sent from the ActiveMQ - User mailing list archive at Nabble.com.