tdierks
By:
tdierks

4.2.2.2 not responding to DNS queries

September 11, 2014 2.8k views

By default, my droplet (Ubuntu 13.04 x64) was set up with two DNS servers in resolv.conf: 8.8.8.8 and 4.2.2.2. In debugging why my client requests to Twilio were slow or failing, I found out that host resolution was timing out half the time and eventually discovered that 4.2.2.2 is not responding to queries from my droplet:

dierks@sharkodile:~$ host api.twilio.com 4.2.2.2
;; connection timed out; no servers could be reached

It works from my desktop in my office:

~ $ host api.twilio.com 4.2.2.2
Using domain server:
Name: 4.2.2.2
Address: 4.2.2.2#53
Aliases: 
api.twilio.com is an alias for public-vip374d1ca4e.prod.twilio.com.
public-vip374d1ca4e.prod.twilio.com is an alias for ec2-174-129-254-101.compute-1.amazonaws.com.
ec2-174-129-254-101.compute-1.amazonaws.com has address 174.129.254.101

This could be specific to my droplet or to DO. It's not a big concern for me (I just replaced 4.2.2.2 with 8.8.4.4 in my config; Level3 apparently doesn't want the public using 4.2.2.2 in the first place), but I thought I'd see if anyone else was seeing this problem and possibly contribute if anyone else is trying to debug similar problems.

2 Answers

New droplets should no longer be created with 4.2.2.2 in resolv.conf We encourage users that have an older droplet with it still there to replace it with 8.8.4.4 like you've already done.

For what it's worth, we had an issue in PHP where curl was taking ages to do DNS lookups. This turned out to be the culprit.

Have another answer? Share your knowledge.