Linode Forum
https://forum.linode.com/

PHP curl "couldn't connect to host"
https://forum.linode.com/viewtopic.php?f=19&t=4729
Page 1 of 1

Author:  kane [ Wed Oct 14, 2009 1:03 pm ]
Post subject:  PHP curl "couldn't connect to host"

Hi guys! Happy to be part of this community. Seems like a great bunch of people here. :)

Disclaimer: I'm a bit rusty with Linux. Used to use Redhat about 10 years ago, but not much experience since then.

I'm running Ubuntu 9.04 64 bit on my Linode.

Typical LAMP install with UFW. I only have port 80 and 22 open.

I'm running a web service that runs every 5 minutes via a cron job and needs to connect to other sites using their APIs. I'm using PHP curl to do this.

I moved from Dreamhost shared hosting (don't laugh! ;)) and everything was working smoothly, but on Linode the curl attempted connections are failing with errors like:
  • name lookup timed out
  • couldn't connect to host
My first thought is that I must not have any DNS servers setup. But I checked and I'm using DHCP which seems to be getting 2 of Linode's DNS servers.

Here's the DHCP information from Linode Manager Network tab:
Gateways: 74.207.243.1
Netmask: 255.255.255.0
DNS Servers: 74.207.241.5, 74.207.242.5


Any ideas? This is very strange indeed. Are the Linode DNS servers faulty or not reliable?

Author:  jed [ Wed Oct 14, 2009 1:43 pm ]
Post subject: 

We have resolved some issues with the primary resolver in Fremont, which may have caused these problems. They should be resolved now.

Interesting, because the primary was down, but the secondary was up...surprising that cURL didn't move on the secondary (it should have)...

Author:  kane [ Wed Oct 14, 2009 1:56 pm ]
Post subject: 

Thanks Jed!

It seems better now :)

Yeah, that is strange that it wouldn't try the 2nd DNS...

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/