cURL: Hostname was NOT found in DNS cache

Rodrigo Reyes <[email protected]> Tue, 25 Oct 2016 10:04:04 -0500
Newsgroups gmane.comp.web.curl.php
Message-ID <CAJhikASNATmzCEXqMvKegXJfpXpGehavpKXU-MfsomBeK8o3HA@mail.gmail.com>
--===============1440679512==
Content-Type: multipart/alternative; boundary=001a114bf1ecc77bab053fb1d1b2

--001a114bf1ecc77bab053fb1d1b2
Content-Type: text/plain; charset=UTF-8

Hi. We are having a strange issue with PHP Curl.

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

--001a114bf1ecc77bab053fb1d1b2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi. We are having a strange issue with PHP Curl.<div><br><=
/div><div>It happens around once every minute and this is what we see in th=
e logs:<br></div><div><br></div><div><div><font face=3D"monospace, monospac=
e">* Connection #0 to host data01 left intact</font></div><div><font face=
=3D"monospace, monospace">* Hostname was NOT found in DNS cache</font></div=
><div><font face=3D"monospace, monospace">* =C2=A0 Trying x.x.x.x...</font>=
</div><div><font face=3D"monospace, monospace">* connect to x.x.x.x port yy=
yy failed: Connection timed out</font></div><div><font face=3D"monospace, m=
onospace">* Failed to connect to x.x.x.x port yyyy: Connection timed out</f=
ont></div><div><font face=3D"monospace, monospace">* Closing connection 0`<=
/font></div></div><div><br></div><div><div>We have data01 correctly defined=
 in our /etc/hosts file but for some reason, the resolved x.x.x.x IP addres=
s is incorrect so the connection fails.</div><div><br></div><div>curl --ver=
sion returns the following:</div><div><br></div><div>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</div></div><div><br></div><div>Please help</div></div>

--001a114bf1ecc77bab053fb1d1b2--

--===============1440679512==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KaHR0cHM6Ly9j
b29sLmhheHguc2UvY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL2N1cmwtYW5kLXBocAo=

--===============1440679512==--