Thanks, Ask!<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="Apple-style-span" style>amqplib versions after and including 1.0 enables SO_KEEPALIVE by default,<br></span><span class="Apple-style-span" style>and Kombu versions after and including 1.2.1 depends on amqplib >= 1.0,<br>
</span><span class="Apple-style-span" style>so maybe you should update your package dependencies?</span></blockquote><div><span class="Apple-style-span" style><br></span></div><div>devstack requied amqplib 0.6.1.<div><br>
</div><div>I will research the best solution more detailed.<br></div></div><br><div class="gmail_quote">2011/12/29 Ask Solem <span dir="ltr"><<a href="mailto:ask@rabbitmq.com">ask@rabbitmq.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 28 Dec 2011, at 14:38, Roman Sokolkov wrote:<br>
<br>
> Hi!<br>
><br>
> I tried to make Rabbit HA for Openstack.<br>
><br>
> My first e-mail was little innacurate.<br>
><br>
> I use two nodes with active/active rabbits with mirrored queues. Additionally I use Virtual IP. And all it managed by Pacemaker. Openstack uses this remote rabbitmq via VIP.<br>
><br>
> I hardly reboot node with VIP and VIP moves to other node. In this case, connections on Openstack host staying forever in ESTABLISHED state(in py-amqlib 0.6.1 no tcp keepalive options).<br>
> Openstack think that all good and doesn't try to reconnect. But I if correctly stop RabbitMQ, connections closed correctly and Openstack will try to reconnect.<br>
><br>
> I solve this issue by adding tcp_keepalive options in py-amqlib(transport.py).<br>
<br>
</div>amqplib versions after and including 1.0 enables SO_KEEPALIVE by default,<br>
and Kombu versions after and including 1.2.1 depends on amqplib >= 1.0,<br>
so maybe you should update your package dependencies?<br>
<div class="im"><br>
<br>
<br>
><br>
><br>
> It's very interesting what implemented in KAMQP. And how heartbeats work?<br>
<br>
</div>Heartbeats is functionality part of the amqp 0-8 spec.<br>
Heartbeats are enabled by specifying a heartbeat frequency, the broker will then<br>
send heartbeat frames at that suggested frequency, and the client will also have<br>
to send heartbeat frames back.  If heartbeats are missed by either the broker or client<br>
the connection shall be disconnected.<br>
<br>
It's a very simple concept, but the problem with amqplib is that it is non-threaded,<br>
so it can be  for the client to miss sending a heartbeat if it is blocking<br>
elsewhere.  This is not a problem when using eventlet/gevent (that is unless the process is blocking, but that should never happen when using greenlets).</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards, Roman Sokolkov<br>