You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Antoine Hebert <An...@Ticketmaster.com> on 2009/06/18 18:00:07 UTC

Cluster/failover

Hi, I'm pretty new to Java and to JMS as well, I want to perform Qpid
clustering and failover tests. I searched the documentation and I'm not
sure I do things properly. I use the C++ broker with Java clients.

First I have two boxes with Qpid:
- boxA inet addr: 192.168.1.204 mask: 255.255.255.0
- boxB inet addr: 192.168.1.96 mask: 255.255.255.0

So I set /etc/ais/openais.conf totem.interface.bindnetaddr = 192.168.1.0

I have two other boxes to use for a publisher/subscriber test. I use the
following setting:

connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/test
?brokerlist='tcp://192.168.1.204:5672;tcp://192.168.1.96:5672'

I start qpid using './qpidd --load-module cluster.so --cluster-name
cluster1', the second cluster gives me a message saying it's joining
cluster cluster1 and that it "caught up, active cluster member". So I
guess everything is ok on this side... 

When I start the publisher and subscriber everything works all right.
All the messages are delivered properly...

If I kill boxB, boxA gives a message "last broker standing, update queue
policies" and all messages continue to be delivered without any problem.

if I kill boxA instead, both the publisher and the subscriber give me a
connection aborted message and messages stops to be delivered.

org.apache.qpid.transport.ConnectionException: connection aborted
        at
org.apache.qpid.transport.Connection.closed(Connection.java:428)
        at
org.apache.qpid.transport.network.Assembler.closed(Assembler.java:113)
        at
org.apache.qpid.transport.network.InputHandler.closed(InputHandler.java:
201)
        at
org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:151)
        at java.lang.Thread.run(Thread.java:619)

It seems my pub/sub are ignoring the cluster itself and that they are
connecting to the boxA directly.

Does anyone know what I'm doing wrong?

Thanks!
CONFIDENTIALITY NOTICE:

This message contains information which may be confidential or privileged.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this transmission in error, please notify me immediately by telephone.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: Cluster/failover

Posted by Antoine Hebert <An...@Ticketmaster.com>.
Hi, even though it looks weird, per this page he is right on the quoting of the url :)

http://qpid.apache.org/connection-url-format.html

-- Antoine

-----Original Message-----
From: Ján Sáreník [mailto:jsarenik@redhat.com] 
Sent: Friday, June 19, 2009 7:45 AM
To: users@qpid.apache.org
Subject: Re: Cluster/failover

Hi Rafael!

On Thu, Jun 18, 2009 at 02:10:43PM -0400, Rafael Schloming wrote:
> ...tcp://192.168.1.96:5672'&failover='roundrobin?cyclecount='20''
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Excuse me, but is that really the right way to quote it?
If I was a syntax checker, I would be confused by those apostrophes.

  Jasan.
--
Red Hat Czech, MRG Quality Assurance Associate

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

CONFIDENTIALITY NOTICE:

This message contains information which may be confidential or privileged.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this transmission in error, please notify me immediately by telephone.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Cluster/failover

Posted by Ján Sáreník <js...@redhat.com>.
Hi Rafael!

On Thu, Jun 18, 2009 at 02:10:43PM -0400, Rafael Schloming wrote:
> ...tcp://192.168.1.96:5672'&failover='roundrobin?cyclecount='20''
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Excuse me, but is that really the right way to quote it?
If I was a syntax checker, I would be confused by those
apostrophes.

  Jasan.
-- 
Red Hat Czech, MRG Quality Assurance Associate

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: Cluster/failover

Posted by Antoine Hebert <An...@Ticketmaster.com>.
Thanks for the quick response Rafael,

I tried to add &failover='roundrobin?cyclecount='20'' but it didn't do
the trick. I still experience the same issue.

I'll try to grab a JAVA failover example somewhere.

-- Antoine

-----Original Message-----
From: Rafael Schloming [mailto:rafaels@redhat.com] 
Sent: Thursday, June 18, 2009 2:11 PM
To: users@qpid.apache.org
Subject: Re: Cluster/failover

Antoine Hebert wrote:
> Hi, I'm pretty new to Java and to JMS as well, I want to perform Qpid 
> clustering and failover tests. I searched the documentation and I'm 
> not sure I do things properly. I use the C++ broker with Java clients.
> 
> First I have two boxes with Qpid:
> - boxA inet addr: 192.168.1.204 mask: 255.255.255.0
> - boxB inet addr: 192.168.1.96 mask: 255.255.255.0
> 
> So I set /etc/ais/openais.conf totem.interface.bindnetaddr = 
> 192.168.1.0
> 
> I have two other boxes to use for a publisher/subscriber test. I use 
> the following setting:
> 
> connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/te
> st ?brokerlist='tcp://192.168.1.204:5672;tcp://192.168.1.96:5672'

Try adding &failover='roundrobin?cyclecount='20'' to your URL:

connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/test
?brokerlist='tcp://192.168.1.204:5672;tcp://192.168.1.96:5672'&failover=
'roundrobin?cyclecount='20''

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

CONFIDENTIALITY NOTICE:

This message contains information which may be confidential or privileged.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this transmission in error, please notify me immediately by telephone.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Cluster/failover

Posted by Rafael Schloming <ra...@redhat.com>.
Antoine Hebert wrote:
> Hi, I'm pretty new to Java and to JMS as well, I want to perform Qpid
> clustering and failover tests. I searched the documentation and I'm not
> sure I do things properly. I use the C++ broker with Java clients.
> 
> First I have two boxes with Qpid:
> - boxA inet addr: 192.168.1.204 mask: 255.255.255.0
> - boxB inet addr: 192.168.1.96 mask: 255.255.255.0
> 
> So I set /etc/ais/openais.conf totem.interface.bindnetaddr = 192.168.1.0
> 
> I have two other boxes to use for a publisher/subscriber test. I use the
> following setting:
> 
> connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/test
> ?brokerlist='tcp://192.168.1.204:5672;tcp://192.168.1.96:5672'

Try adding &failover='roundrobin?cyclecount='20'' to your URL:

connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/test?brokerlist='tcp://192.168.1.204:5672;tcp://192.168.1.96:5672'&failover='roundrobin?cyclecount='20''

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org