cURL: Hostname was NOT found in DNS cache - Ask Ubuntu
we having strange error. happens around once every minute , see in logs:
* connection #0 host data01 left intact * hostname not found in dns cache * trying x.x.x.x... * connect x.x.x.x port yyyy failed: connection timed out * failed connect x.x.x.x port yyyy: connection timed out * closing connection 0`
we have data01 correctly defined in our /etc/hosts file reason, resolved x.x.x.x ip address incorrect connection fails.
curl --version returns following:
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 openssl/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
please help.
finally, found workaround: curlopt_resolve
although curl incorrectly resolving ip address of host, using option allowed override regular resolution process.
hope helps other people find same issue.
Comments
Post a Comment