[rabbitmq-discuss] "None of the specified endpoints were reachable"

Tammo.Filusch at btc-ag.com Tammo.Filusch at btc-ag.com
Fri Jul 24 08:08:45 BST 2009


Hy,

i was able to solve this by changing windows registry entries for "MaxUserPort" and "TcpTimedWaitDelay".
Found a nice howto here:
http://msdn.microsoft.com/en-us/library/cc296845(BTS.10).aspx


because i experienced connection timeouts after setting "TcpTimedWaitDelay" to its minimum i had to balance the values and it works fine now.

thanks again.




Hey Tony,

first of all thanks for the great advice so far.

> -----Ursprüngliche Nachricht-----
> Von: Tony Garnock-Jones [mailto:tonyg at lshift.net] 
> Gesendet: Dienstag, 21. Juli 2009 16:38
> An: Filusch, Tammo
> Cc: rabbitmq
> Betreff: Re: AW: [rabbitmq-discuss] "None of the specified endpoints were reachable"
>
> Hi Tammo,
>
> Tammo.Filusch at btc-ag.com wrote:
>> None of the specified endpoints were reachable
>> Endpoints attempted:
>>   endpoint=amqp-0-8://localhost:5672, attempts=1, outcome=Normalerweise darf jede Socketadresse (Protokoll, Netzwerkadresse oder Anschluss) nur jeweils einmal verwendet werden 127.0.0.1:5672
>> Stack trace:
>>    bei RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32 maxRedirects, AmqpTcpEndpoint[] endpoints)
>>    bei RabbitMQ.Client.ConnectionFactory.CreateConnection(AmqpTcpEndpoint[] endpoints)
>>    bei RabbitMQ.Client.ConnectionFactory.CreateConnection(String address)
>>    bei ...SendDataViaTcp(dataRequest request) in ...\RmqServiceClient.cs:Line 46.
>
>This error text is associated with error code 10048, WSAEADDRINUSE.
>
> looking at the "outcome" part of the error message, it seems as if
> the connection from the client to the broker is not closed properly
> and because of that all possible sockets are taken.
>
>Exactly -- but it's not necessarily because the connection isn't closed
>properly! (Though, of course, it could be -- please try your system's
>equivalent of netstat after 1000 messages or so, and see if there are
>around 1000 active connections lying around.) I suspect TCP's TIME_WAIT
>state, where if many connections are rapidly opened and closed, the TCBs
>are kept around for a while to let delayed segments drop out of the
>network. After a while, these can build up, leading to client-side TCP
>port exhaustion. 


I will use 'netstat' tomorrow and try to verify your first theory. 
I suspect that your second suggestion is the more plausible since the connections are opened "as fast as possible", 
and if your second explanation turns out to be true the  design should be seriously changed.


>> the following code is executed for every single message. after about
>> 3800 messages had been transfered and consumed successfully the above
>> error message is thrown by the sending client while executing the
>> first line:
>> using (IConnection conn = new ConnectionFactory().CreateConnection(serverAddress))
>>                 { [...] }
>
>Over how long a period are these 3800 connections opened and closed? If
>it's reasonably quickly -- a couple of minutes, say -- it could well be
>TIME_WAIT causing the issue.
>
>> are there any obvious mistakes in my pieces of code?
>Well... if possible, open *one* connection, and reuse it! :-)


This was my first attempt to solve this and works perfectly, but unfortunatly not applicable without violation of the design constraints.

Thanks again for the great help,

Cheers,

Tammo

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss




More information about the rabbitmq-discuss mailing list