ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Connect with invalid user/pass hangs indefinitely. #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?

0.6

Which broker are you using (RabbitMQ?) which version?

RabbitMQ 1.5.0

Which version of Python?
2.6.2

What steps will reproduce the problem?
Connect to a RabbitMQ server/vhost with a username/pass that does not have 
permissions.

What is the expected output? What do you see instead?
On py-amqplib 0.5, you'd get this error:

unpack requires a string argument of length 1

Which at least was trappable.

On 0.6 you hang indefinitely...connect never returns.

Please provide any additional information below.

Original issue reported on code.google.com by jasonjww...@gmail.com on 13 Sep 2009 at 1:34

GoogleCodeExporter commented 9 years ago
Here's the traceback when you force terminate the program:

  File "<snip>/lib/amqplib/client_0_8/connection.py", line 140, in __init__
    (10, 30), # tune
  File "<snip>/lib/amqplib/client_0_8/abstract_channel.py", line 64, in wait
    self.channel_id, allowed_methods)
  File "<snip>/lib/amqplib/client_0_8/connection.py", line 201, in _wait_method
    self.method_reader.read_method()
  File "<snip>/lib/amqplib/client_0_8/method_framing.py", line 212, in read_method
    self._next_method()
  File "<snip>/lib/amqplib/client_0_8/method_framing.py", line 127, in _next_method
    frame_type, channel, payload = self.source.read_frame()
  File "<snip>/lib/amqplib/client_0_8/transport.py", line 105, in read_frame
    frame_type, channel, size = unpack('>BHI', self._read(7))
  File "<snip>/lib/amqplib/client_0_8/transport.py", line 191, in _read
    self._read_buffer += self.sock.recv(65536)

Original comment by jasonjww...@gmail.com on 13 Sep 2009 at 1:39

GoogleCodeExporter commented 9 years ago
You'll want version 0.6.1, which includes this fix

http://code.google.com/p/py-amqplib/source/detail?r=0027351c2ed28b56bf23501cb27b
8a5a9a7f8edf

This is also a duplicate of issue #2, 

http://code.google.com/p/py-amqplib/issues/detail?id=2

which is explained there a bit.

Original comment by barry.pe...@gmail.com on 13 Sep 2009 at 4:04