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

Simon MacMullen simon at rabbitmq.com
Mon Sep 16 17:25:36 BST 2013


Hmm. That looks like some problem (in the server) encoding the response 
to connection.start-ok, i.e. connection.tune. Have you customised the 
frame_max or heartbeat setting in the rabbitmq.config file? Can you post 
your config?

Cheers, Simon

On 16/09/13 16:04, 鞠大升 wrote:
> 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
> <http://127.0.0.1:44572/> -> 127.0.0.1:5672 <http://127.0.0.1:5672/>)
>
> =ERROR REPORT==== 16-Sep-2013::22:27:32 ===
> closing AMQP connection <0.322.0> (127.0.0.1:44572
> <http://127.0.0.1:44572/> -> 127.0.0.1:5672 <http://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?*
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list