cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Couldn't Connect Error - Address already in use

From: Alfred Gebert <alfred.gebert_at_gmail.com>
Date: Tue, 13 Jul 2010 09:52:29 +0200

On Mon, Jul 12, 2010 at 6:05 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 12 Jul 2010, Alfred Gebert wrote:
>
>> libcurl can't create additional outgoing TCP/IP connections because it
>> runs out of available port numbers for the IP address.
>
> Really? libcurl's return code 7 is a connect failure, and by that time it
> already got a socket to use. The _server_ however tries to create a new
> socket at connect time and may fail if it runs out of them...
>

The server had no error but the connect() of libcurl fails and error
is WSAEADDRINUSE (Address already in use).

The documentation of WSAEADDRINUSE is:
The socket's local address is already in use and the socket was not
marked to allow address reuse with SO_REUSEADDR. This error usually
occurs when executing bind, but could be delayed until the connect
function if the bind was to a wildcard address (INADDR_ANY or
in6addr_any) for the local IP address. A specific address needs to be
implicitly bound by the connect function.

http://msdn.microsoft.com/en-us/library/ms737625%28VS.85%29.aspx

> --
>
>  / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-13