[rabbitmq-discuss] Clustering question

Francesco Mazzoli francesco at rabbitmq.com
Mon Jun 11 16:28:14 BST 2012


Hi,

 > The node called rabbit at RIYAZ is down. Now, according to the
 > clustering documentation on rabbitMQ ("A client can connect as
 > normal to any node within a cluster. If that node should fail, and
 > the rest of the cluster survives, then the client should notice the
 > closed connection, and should be able to reconnect to some surviving
 > member of the cluster."), the producer that I run on my local
 > machine should connect to either ORION or ALLEGRO. But it doesn't,
 > the producer throws an exception as follws:
 > [...]
 > My producer connects to RIYAZ.

The docs here are telling you that is the client responsibility to
detect offline nodes and connect to other nodes in the cluster; not
that the AMQP client code will do that for you automatically. In this
case you will need to manually connect to ALLEGRO or ORION when RIYAZ
is down.

Francesco.

On 07/06/12 20:51, Mahesh Viraktamath wrote:
>> Hi,
>>
>>
>> I need some help in clustering three nodes and I am stuck. I hope, you will help.
>>
>>
>> I have clustered three rabbitMQ nodes.
>>
>> On ORION :
>>
>> C:\Program Files\RabbitMQ Server\rabbitmq_server-2.8.1\sbin>rabbitmqctl.bat cluster_status
>> Cluster status of node rabbit at ORION ...
>> [{nodes,[{disc,[rabbit at ALLEGRO,rabbit at RIYAZ,rabbit at ORION]}]},
>>   {running_nodes,[rabbit at ALLEGRO,rabbit at ORION]}]
>> ...done.
>>
>>
>> On ALLEGRO :
>>
>> C:\Program Files\RabbitMQ Server\rabbitmq_server-2.8.1\sbin>rabbitmqctl.bat cluster_status
>> Cluster status of node rabbit at ALLEGRO ...
>> [{nodes,[{disc,[rabbit at ALLEGRO,rabbit at RIYAZ,rabbit at ORION]}]},
>>   {running_nodes,[rabbit at ORION,rabbit at ALLEGRO]}]
>> ...done.
>>
>> The node called rabbit at RIYAZ is down. Now, according to the clustering documentation on rabbitMQ ("A client can connect as normal to any node within a cluster. If that node should fail, and the rest of the cluster survives, then the client should notice the closed connection, and should be able to reconnect to some surviving member of the cluster."), the producer that I run on my local machine should connect to either ORION or ALLEGRO. But it doesn't, the producer throws an exception as follws:
>>
>> java.net.NoRouteToHostException: No route to host
>> at java.net.PlainSocketImpl.socketConnect(Native Method)
>> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
>> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
>> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
>> at java.net.Socket.connect(Socket.java:579)
>> at com.rabbitmq.client.ConnectionFactory.createFrameHandler(ConnectionFactory.java:445)
>> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:504)
>> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:533)
>> at producer.RPCClient1.<init>(RPCClient1.java:22)
>> at producer.RPCClient.main(RPCClient.java:68)
>>
>> My producer connects to RIYAZ.
>>
>>
>> Please shed some light.
>>
>>
>> Thanks,
>> Mahesh
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list