carrot icon indicating copy to clipboard operation
carrot copied to clipboard

Creating AMQPConnection hangs in busy loop

Open azf opened this issue 15 years ago • 8 comments

When I try to do this straight from the introduction:

from carrot.connection import AMQPConnection amqpconn = AMQPConnection(hostname="localhost", port=5672, userid="test", password="test", vhost="test")

the whole thing ends up in a busy loop:

File "", line 1, in File "/Library/Python/2.5/site-packages/carrot-0.5.1-py2.5.egg/carrot/connection.py", line 92, in init self.connect() File "/Library/Python/2.5/site-packages/carrot-0.5.1-py2.5.egg/carrot/connection.py", line 110, in connect connect_timeout=self.connect_timeout) File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/connection.py", line 143, in init File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/connection.py", line 477, in _x_open File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/abstract_channel.py", line 64, in wait File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/connection.py", line 201, in _wait_method File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/method_framing.py", line 212, in read_method File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/method_framing.py", line 127, in _next_method File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/transport.py", line 105, in read_frame File "build/bdist.macosx-10.5-i386/egg/amqplib/client_0_8/transport.py", line 191, in _read

It won't time out or anything. Am I doing something wrong or missing something obvious?

Tried on OS X 10.5.7, against RabbitMQ 1.6.0 which otherwise seems to be working just fine. This happens both with Python 2.6.2 (from Macports) and Python 2.5.1 (from Apple)

azf avatar Jul 22 '09 20:07 azf

This is believed to be a problem with amqplib. It usually happens when it can't connect, or authenticate to the server. See: http://github.com/ask/celery/issues#issue/9

ask avatar Jul 29 '09 20:07 ask

I'm keeping the issue open until we can find a solution, either for carrot or for amqplib.

ask avatar Jul 29 '09 20:07 ask

I got the same problem on OS X 10.5.7. It happened when the client failed authentication and also when authentication succeeded but the user didn't have permissions to access the vhost.

chrismiles avatar Jul 30 '09 09:07 chrismiles

It seems this is actually a RabbitMQ issue that will be fixed in 1.7

ask avatar Aug 26 '09 08:08 ask

Good to know. Thank you for the heads-up.

azf avatar Aug 26 '09 08:08 azf

Was this fixed in 1.7? I'm hitting it and I'd like to know if I should upgrade rabbitmq.

dbenamy avatar Jan 11 '11 00:01 dbenamy

Oh, and are you sure it's not a bug that carrot is ignoring the connect_timeout arg?

dbenamy avatar Jan 11 '11 00:01 dbenamy

I'm not sure about the status of this, someone hit it recently but I don't know what RabbitMQ version they were running.

AFAICT it doesn't ignore the connect_timeout flag?

ask avatar Jan 11 '11 09:01 ask