cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: curl-library Digest, Vol 88, Issue 39

From: Dave Galloway <dgalloway_at_rx30.com>
Date: Fri, 21 Dec 2012 08:41:44 -0500

----------------------------------------------------------------------

Message: 1
Date: Thu, 20 Dec 2012 08:46:13 -0500
From: Dave Galloway <dgalloway_at_rx30.com>
To: "curl-library_at_cool.haxx.se" <curl-library_at_cool.haxx.se>
Subject: RE: curl-library Digest, Vol 88, Issue 38
Message-ID:
        <EFDE41C6766284419E5BE659A24300B87D1325811C_at_artemis.rx30.com>
Content-Type: text/plain; charset="us-ascii"

Date: Wed, 19 Dec 2012 16:10:46 -0500
From: Dave Galloway <dgalloway_at_rx30.com>
To: "curl-library_at_cool.haxx.se" <curl-library_at_cool.haxx.se>
Subject: RE: CURLE_COULDNT_RESOLVE_HOST using libcurl easy interface
Message-ID:
        <EFDE41C6766284419E5BE659A24300B87D132580A8_at_artemis.rx30.com>
Content-Type: text/plain; charset="us-ascii"

Date: Wed, 19 Dec 2012 11:24:36 +0100 (CET)
From: Daniel Stenberg <daniel_at_haxx.se>
To: libcurl development <curl-library_at_cool.haxx.se>
Subject: Re: CURLE_COULDNT_RESOLVE_HOST using libcurl easy interface
        on Linux
Message-ID: <alpine.DEB.2.00.1212191121390.9615_at_tvnag.unkk.fr>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Tue, 18 Dec 2012, Dave Galloway wrote:

> The code below appears to work fine on Windows, I get the files I
> need. On Linux I am getting CURLE_COULDNT_RESOLVE_HOST. Using curl
> from the command line I can get the files in Linux and Windows, I can ping google.com, etc.
> from the command line in Linux and Windows.

Clearly some kind of name resolving issue. Possibly you experience some kind of bug in that libcurl version. It doesn't make any bells ring in my head though, I can't recall any particular specific problem in the past that would cause something like that. Then again my memory isn't always as good as it should be...

-- 
  / daniel.haxx.se
-------
I must be losing it because I can't seem to see the problem. I have cut down my test program to a bare minimum.
I have tried a newer version of libcurl, 7.21.4 instead of 7.19.6, that I had locally.
If I call curl_easy_setopt(curl, CURLOPT_URL, "google.com") after initializations and such and then curl_easy_perform(curl) it fails.
If I call curl_easy_setopt(curl, CURLOPT_URL, "74.125.140.101") it works.
The failure is on CentOS 5.4. Works fine both ways on the older Red Hat box and my Win 7 box.
At the getaddrinfo level in curl_addrinfo.c I am getting a -2 (NONAME) error which bubbles back up and eventually returns the CURLE_COULDNT_RESOLVE_HOST error.
I can ping google.com and 74.125.140.101 from the command line on all systems with no problem.
Any good ideas? Next up is to build the latest libcurl.
thanks, Dave
------------------------------
Message: 3
Date: Wed, 19 Dec 2012 22:18:30 +0100
From: Dan Fandrich <dan_at_coneharvesters.com>
To: curl-library_at_cool.haxx.se
Subject: Re: CURLE_COULDNT_RESOLVE_HOST using libcurl easy interface
Message-ID: <20121219211830.GA31682_at_coneharvesters.com>
Content-Type: text/plain; charset=iso-8859-1
On Wed, Dec 19, 2012 at 04:10:46PM -0500, Dave Galloway wrote:
> I must be losing it because I can't seem to see the problem. I have cut down my test program to a bare minimum.
> I have tried a newer version of libcurl, 7.21.4 instead of 7.19.6, that I had locally.
> If I call curl_easy_setopt(curl, CURLOPT_URL, "google.com") after initializations and such and then curl_easy_perform(curl) it fails.
Note that "google.com" isn't a URL--it's a host name. libcurl tries to guess correctly what protocol you want in cases like this, but you shouldn't depend on it.
> If I call curl_easy_setopt(curl, CURLOPT_URL, "74.125.140.101") it works.
> The failure is on CentOS 5.4. Works fine both ways on the older Red Hat box and my Win 7 box.
> At the getaddrinfo level in curl_addrinfo.c I am getting a -2 (NONAME) error which bubbles back up and eventually returns the CURLE_COULDNT_RESOLVE_HOST error.
> I can ping google.com and 74.125.140.101 from the command line on all systems with no problem.
> Any good ideas? Next up is to build the latest libcurl.
What name resolver back-end is your libcurl configured to use?
>>> Dan
----
This is the configure that I run before I run make:
./configure --prefix=/home/dgalloway/local --with-openssl=/home/dgalloway/local
--with-libssh2=/home/dgalloway/local --disable-ldap --disable-ldaps
It shows that the resolver is default. I did build the 7.28.1 version and I get the same thing.
Works on the older Red Hat system but can't resolve on the CentOS system. Command line pings and curl calls work on both. I did try "http://google.com" as well and same thing.
Thanks,
Dave
--------
Another piece of the puzzle.
One of our other programmers has a CentOS box with our development environment.
He built my test program on it and it runs fine on the CentOS system.
It segfaults on the old RH system and says the kernel is too old.
I did some digging into the build output and there are some messages about
needing the shared libraries from glibc at runtime for gethostbyname, gethostbyname_r, etc.
I am guessing that the glibc that we build against is incompatible with the newer
CentOS libraries?? Is it possible to substitute the piece of glibc for internet-type calls on 
our build box with a newer one and not break things?
Thanks, Dave
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-21