cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Always getting CURLE_COULDNT_CONNECT on Win2K

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 3 Mar 2005 14:02:21 +0100 (CET)

On Mon, 28 Feb 2005, Adam D. Moss wrote:

> This generally works fine, on Linux and most Windows machines. However, it
> seems that on ~100% of Windows2000 client machines (tested by users on
> several win2k machines at several points on the internet) and a very small
> scattering of other machines I get a CURLE_COULDNT_CONNECT.
>
> This occurs with all of the various tried versions of libcurl from CVS
> between 2004-12-08 and 2005-02-17 - I haven't tried anything older. (Until
> February's CVS update, the error that win2k saw was
> CURLE_OPERATION_TIMEOUTED, which judging from the libcurl changelog was the
> incorrect error code.) I don't personally have very good access to
> Windows2000 to track this down.

Me neither.

> This is a pretty ordinary HTTP fetch using the MULTI interface and basic
> authentication. All libcurl compiles include C-ARES support, and I
> --disable all protocols except vanilla HTTP support.

Have you tried doing this without c-ares? It seems like it could be a source
of error here. (Not saying it is, just that it would be good to rule it out.)

> One of the things I thought of is that I'm using
> curl_global_init(CURL_GLOBAL_ALL) which (since I'm also initializing C-ARES
> independantly because I use C-ARES for other non-libcurl purposes) could
> cause winsock to be initialized twice which according to the libcurl docs
> can be a bad thing. However, when I changed this so that libcurl didn't
> init winsock, a tester reported no change in behaviour.

Right, I'm not sure that actually is such a bad thing to do.

> One of the other ideas I had was that perhaps Win2K accidentally always sets
> one of the "standard" proxy environment variables for completely unrelated
> purposes, but I haven't been able to verify that yet. Seems a long shot.

I doubt that is the case.

> Any other ideas?

If it still fails without c-ares, can you figure out exactly what code in
libcurl that returns the error?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-03-03