[rabbitmq-discuss] ConnectFailureException on CreateConnection()

Matthias Radestock matthias at rabbitmq.com
Mon Aug 19 08:49:45 BST 2013

On 15/08/13 18:26, akmartin wrote:
> The following exception is thrown when I try to connect to RabbitMq.
> My retry logic forces another attempt and the second time through it
> succeeds. Every invocation is configured with the same hostname and
> resolve to the same endpoint.

Are these connection attempts made from some sort of test framework, 
that starts rabbit, connects, runs a test, stops rabbit, etc?

I am asking because...

> =INFO REPORT==== 15-Aug-2013::13:13:58 ===
> Management plugin started. Port: 15672
> =INFO REPORT==== 15-Aug-2013::13:13:58 ===
> accepting AMQP connection <0.331.0> ( ->

...this shows a connection getting accepted immediately as the broker 
comes up.

So I suspect what's happening is that the failed connection attempts 
occur during the broker startup phase, which suggests your test code, or 
whatever it is, doesn't wait for the broker to fully start before 
attempting to connect.

Unfortunately, afaik, there is no easy way on Windows to wait for the 
broker to start. So you may just have to retry the connection attempts 
until they succeed.

> I am running 3.1.3. Waiting on updated nuget packages to upgrade
> servers.

You can upgrade the server w/o upgrading the clients. And vice versa.



More information about the rabbitmq-discuss mailing list