0

We are having a strange error. It happens around once every minute and this is what we see in the logs:

* Connection #0 to host data01 left intact
* Hostname was NOT found in DNS cache
*   Trying x.x.x.x...
* connect to x.x.x.x port yyyy failed: Connection timed out
* Failed to connect to x.x.x.x port yyyy: Connection timed out
* Closing connection 0`

We have data01 correctly defined in our /etc/hosts file but for some reason, the resolved x.x.x.x IP address is incorrect so the connection fails.

curl --version returns the 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.

1 Answer 1

0

Finally, found a workaround: CURLOPT_RESOLVE

Although cURL was incorrectly resolving the IP address of the host, using that option allowed us to override the regular resolution process.

Hope it helps other people who find the same issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .