[rabbitmq-discuss] can not connect to rabbitmq because pika.exceptions.ProbableAuthenticationError

鞠大升 dashengju at gmail.com
Mon Sep 16 16:10:15 BST 2013


when I change pika to 0.9.8, the error info change to :

No handlers could be found for logger "pika.adapters.base_connection"
Traceback (most recent call last):
  File "./send.py", line 5, in <module>
    host='localhost'))
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/base_connection.py", 
line 61, in __init__
    super(BaseConnection, self).__init__(parameters, on_open_callback)
  File "/usr/local/lib/python2.7/dist-packages/pika/connection.py", line 
513, in __init__
    self._connect()
  File "/usr/local/lib/python2.7/dist-packages/pika/connection.py", line 
804, in _connect
    self._adapter_connect()
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", 
line 146, in _adapter_connect
    self.process_data_events()
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", 
line 88, in process_data_events
    if self._handle_read():
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", 
line 184, in _handle_read
    super(BlockingConnection, self)._handle_read()
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/base_connection.py", 
line 300, in _handle_read
    return self._handle_error(error)
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/base_connection.py", 
line 264, in _handle_error
    self._handle_disconnect()
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", 
line 181, in _handle_disconnect
    self._on_connection_closed(None, True)
  File 
"/usr/local/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", 
line 235, in _on_connection_closed
    raise exceptions.AMQPConnectionError(*self.closing)
pika.exceptions.AMQPConnectionError: (0, '')

在 2013年9月16日星期一UTC+8下午11时04分35秒,鞠大升写道:
>
> hi, all
>
> I am newer to rabbitmq.
>
> I install a rabbitmq, just download, setup and startup the server. then I 
> use a simple python client to connect, but the client report a error.
>
> =================================================
> Here is my version config:
> python: 2.7
> rabbitmq:  rabbitmq-server-generic-unix-3.1.5.tar.gz
> erlang: otp_src_R16B01
> pika: master
>
> =================================================
> Here is my python client:
> #!/usr/bin/env python
> import pika
>
> connection = pika.BlockingConnection(pika.ConnectionParameters(
>             host='localhost'))
> channel = connection.channel()
>
>
> channel.queue_declare(queue='hello')
>
> channel.basic_publish(exchange='',
>             routing_key='hello',
>             body='Hello World!')
> print " [x] Sent 'Hello World!'"
> connection.close()
>
> =================================================
> Here is the error info:
> Traceback (most recent call last):
>   File "send.py", line 5, in <module>
>     host='localhost'))
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 123, in __init__
>     super(BlockingConnection, self).__init__(parameters, None, False)
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/base_connection.py", 
> line 62, in __init__
>     on_close_callback)
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/connection.py", 
> line 593, in __init__
>     self.connect()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 223, in connect
>     error = self._adapter_connect()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 302, in _adapter_connect
>     self.process_data_events()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 233, in process_data_events
>     if self._handle_read():
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 346, in _handle_read
>     super(BlockingConnection, self)._handle_read()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/base_connection.py", 
> line 323, in _handle_read
>     return self._handle_error(error)
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/base_connection.py", 
> line 287, in _handle_error
>     self._handle_disconnect()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 336, in _handle_disconnect
>     self._adapter_disconnect()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/blocking_connection.py", 
> line 311, in _adapter_disconnect
>     self._check_state_on_disconnect()
>   File 
> "/usr/local/lib/python2.7/dist-packages/pika-0.9.14p0-py2.7.egg/pika/adapters/base_connection.py", 
> line 141, in _check_state_on_disconnect
>     raise exceptions.ProbableAuthenticationError
> pika.exceptions.ProbableAuthenticationError
>
> =================================================
> Here is the log info:
> =INFO REPORT==== 16-Sep-2013::22:27:29 ===
> accepting AMQP connection <0.322.0> (127.0.0.1:44572 -> 127.0.0.1:5672)
>
> =ERROR REPORT==== 16-Sep-2013::22:27:32 ===
> closing AMQP connection <0.322.0> (127.0.0.1:44572 -> 127.0.0.1:5672):
> {handshake_error,starting,0,
>     {error,badarg,'connection.start_ok',
>         [{rabbit_framing_amqp_0_9_1,encode_method_fields,1,[]},
>          {rabbit_binary_generator,build_simple_method_frame,3,[]},
>          {rabbit_writer,internal_send_command,4,[]},
>          {rabbit_reader,send_on_channel0,3,[]},
>          {rabbit_reader,auth_phase,2,[]},
>          {rabbit_reader,handle_method0,3,[]},
>          {rabbit_reader,handle_input,3,[]},
>          {rabbit_reader,recvloop,2,[]}]}}
>
> =================================================
> *Anyone can tell me what's the problem?*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130916/602ad7ef/attachment.htm>


More information about the rabbitmq-discuss mailing list