[rabbitmq-discuss] py-amqplib doesn't like Rabbit user refusals

Matthias Radestock matthias at lshift.net
Mon Feb 2 22:47:39 GMT 2009


Jason,

Jason J. W. Williams wrote:
> It appears that py-amqplib really doesn't like it when you try to log
> on to a vhost with a user that lacks authorization. Instead of
> specific exception, a struct.error exception is raised with this
> traceback:
> [...]
> The RabbitMQ side reports a rather sane error:
> 
> {channel0_error,starting,
>                 {amqp,access_refused,"login refused for user 'argus'",
>                       'connection.start_ok'}}
> 
> Is py-amqplib just not set up to cleanly handle user refusals, or is
> this an unknown bug?

The server does not pass any information to the client in this case. 
That is a requirement of the spec. See section 2.2.4 of the AMQP 0-9-1 
spec: "prior to sending or receiving Open or Open-Ok, a peer that 
detects an error MUST close the socket without sending any further data."


Matthias.




More information about the rabbitmq-discuss mailing list