0

I am getting some strange DNS/Network issues accessing sites running on my Ubuntu 10.10 instance on EC2. I have 6 sites VHosted on a single LAMP stack which have been quite happily working for a month or so and I have had no issues until now when I am trying to work on these sites from inside a new network at a friends house because my ISP is down. I didn't change anything and suddenly I cannot access my sites over HTTP from my Mac although my phone over 3G picks up the DNS fine so it looks like it's a property of the network I am on and externally all is working ok.

I have these 2 domains (plus 4 others) all mapped to the same Apache instance with a VHost set up for each domain:

  • www.electrichummingbird.com
  • www.comparetheotter.com

I have a default VHost that I can see is working from here so I know Apache and the instance are up:

http://ec2-46-137-25-238.eu-west-1.compute.amazonaws.com

Yet when I do access any of my domains (in 3 browsers, caches cleared) they just time out and when I do an nslookup from my local machine on www.comparetheotter.com (or any of the others) I get

;; connection timed out; no servers could be reached

Just to check off the obvious (to me) responses:
- I can SSH into my box and have tried restarting Apache
- I am only using CNAMEs, no A records in my DNS
- I did not change any DNS, EC2 or LAMP settings at all prior to noticing this issue
- All other websites work fine which is why I think this a property of my EC2 hosted sites - I do not have any local DNS mod services running (XAMPP is shut down) and I've restarted my Mac

If anyone can help me understand what I am doing wrong it would be hugely appreciated. Many Thanks!


EDIT - Thanks @user48838 & @ccame, both very useful responses. I can now see it's a DNS issue but EC2 compounds matters as Amazon are regularly updating their DNS, perhaps even more so than usual due to the issues @user48838 mentions.

nslookup gives interesting findings - only certain external networks are able to find my server:

1.) - local - OK

nslookup www.kodental.co.uk
Server: 192.168.1.254
Address: 192.168.1.254#53 Non-authoritative answer:
www.kodental.co.uk canonical name = ec2-46-137-25-238.eu-west-1.compute.amazonaws.com.
Name: ec2-46-137-25-238.eu-west-1.compute.amazonaws.com
Address: 46.137.25.238

2.) - Other remote network - FAIL

nslookup www.kodental.co.uk 4.2.2.1
Server: 4.2.2.1
Address: 4.2.2.1#53

** server can't find www.kodental.co.uk: NXDOMAIN

3.) - Google as suggested - OK

nslookup www.kodental.co.uk 8.8.8.8 Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
www.kodental.co.uk canonical name = ec2-46-137-25-238.eu-west-1.compute.amazonaws.com.
Name: ec2-46-137-25-238.eu-west-1.compute.amazonaws.com
Address: 46.137.25.238

That solves what the problem is although not how to fix it. Any suggestions as to what I (and others) can do to fix this would be most gratefully received :)

N.B Also - I am using FastHosts in the UK to provide my DNS. I log in and modify the settings for A & MX records etc via a web admin interface but I can't modify the TTL of my DNS

3
  • You do realize that Amazon has been experiencing "difficulties" over the past few days? - venturebeat.com/2011/04/23/…
    – user48838
    Apr 25, 2011 at 18:11
  • Cheers for that info. Ironically in my case it's helping me as otherwise I never would have noticed my DNS issues! Apr 28, 2011 at 23:58
  • Hehe... When things go "bump" in the night, that's when all the skeletons come tumbling out of the closet.
    – user48838
    Apr 29, 2011 at 0:10

1 Answer 1

0

All works well from here and from your iPhone, would agree its likely the network you are on at the moment rather than the issue being with the amazon server.

It feels like the DNS server on your local network is not forwarding requests, try setting your NIC to use 8.8.8.8 and 8.8.4.4 (google public dns servers) as your dns servers on your machine and see whether suddenly the websites start working again.

Please do post back the results and I'll shall see if I can help some more.

3
  • Thanks for this; I edited the question in response as the comment box wouldn't accept enough chars. I will vote you up when I get enough points! :) ++ Apr 28, 2011 at 23:48
  • If I get an EC2 Elastic IP and used an A record instead of a CNAME do you think this would help? I was trying to avoid the expense but... Apr 29, 2011 at 0:00
  • It depends on what the problem was within the local network you were on. I would expect not. Sounds like the local DNS wasn't working correctly.
    – ccame
    May 9, 2011 at 14:25

You must log in to answer this question.

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