cURL / Mailing Lists / curl-library / Single Mail


occasional hostname resolve problems

From: sean <>
Date: Mon, 3 Sep 2007 15:39:22 -0700

Hi All,

I've written a daemon program for an embedded system which uses lib-curl to
periodically do an HTTP HEAD to a known good
server as a form of basic network monitoring to check if the network is up
and running.

Occasionally the curl lib. call fails and returns error code 6
(CURLE_COULDNT_RESOLVE_HOST). I am not sure why it's sometimes
failing, since as soon as it does fail the system automatically runs
ifconfig and pings some known good addresses by hostnames
and IP addresses. Those calls all succeed, so it looks like there is
nothing wrong with the network when the curl call
is failing. The libcurl connect and transfer timeouts are set to fairly
high values (20 and 30seconds).
The embedded system runs uCLinux 2.4.31 and libcurl 7.14.0.

Any ideas as to why libcurl is having problems with resolving hostnames?

Received on 2007-09-04