<div>
<div>
<span>In trying to track this down with RabbitMQ 2.4.1 and Pika 0.9.6pre0 I am not seeing any reply back from Rabbit after a Connection.StartOk is sent, the socket just closes.</span></div><div><br></div><div>Is this expected behavior from the broker perspective? I imagine since the connection is never negotiating doing a Connection.Close from the server is not appropriate. Any suggestions on how to raise this as an Exception since it seems to be an implied behavior that broker disconnects if the mechanism or response values are incorrect?</div><div><br></div><div>The error logs do show the error as expected.</div><div><br></div><div><div>=ERROR REPORT==== 9-May-2011::11:05:32 ===</div><div>exception on TCP connection <0.6098.0> from 127.0.0.1:58311</div><div>{channel0_error,starting,</div><div> {amqp_error,access_refused,</div><div> "PLAIN login refused: user 'gmr' - invalid credentials",</div><div> 'connection.start_ok'}}</div><div><br></div><div>=INFO REPORT==== 9-May-2011::11:05:32 ===</div><div>closing TCP connection <0.6098.0> from 127.0.0.1:58311</div><div><font class="Apple-style-span" color="#A0A0A0"><font class="Apple-style-span" color="#000000"><br></font></font></div></div><div><span class="Apple-style-span" style="color: rgb(160, 160, 160); ">On Thursday, May 5, 2011 at 11:17 AM, Brandon Craig Rhodes wrote:</span></div><div>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>When a error occurs while connecting in Pika 0.9.5, I have to go log on<br>to my RabbitMQ server and look at its logs to discover what happened -<br>the IOLoop in the local program simply returns after three seconds and<br>my next piece of code breaks because the `on_open_callback` callback<br>that I am passing to my `SelectConnection` never gets called when the<br>username and password are wrong.<br><br>How am I supposed to intercept this condition so that I can return an<br>error message to my user? I tried registering a callback with the<br>`connection.add_on_close_callback()` method but, sensibly enough, it<br>never gets called because this is not really a connection-close, but a<br>connection not getting established in the first place. I have looked<br>around for some sort of a `connection.add_on_error_callback()` or some<br>similar sort of facility, but cannot find one.<br><br>How do I catch and handle asynchronous errors?<br><br>Thanks for ANY help that you guys can offer - and thanks, Gavin, for<br>writing such an important part of the modern Python ecosystem!<br><br>-- <br>Brandon Craig Rhodes brandon@rhodesmill.org <a href="http://rhodesmill.org/brandon">http://rhodesmill.org/brandon</a><br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></div></span>
</blockquote>
<div>
<br>
</div>
</div>
</div>