How to troubleshoot "Server not found" messages while browsing?
On my Mac with OS X Snow Leopard, I continually get "Server Not Found" errors on my web browser (Firefox) while browsing various web sites. In attempts to resolve the problem I've tried the following (each, more than once):
- Reset my router (cut power)
- Reset my cable modem (cut power; Comcast)
- Flush DNS via dscacheutil -flushcache
I can't find what is causing the problem or a different way to resolve it. I have several computers on the router and I don't get this problem with them.
In some cases, only part of the page will load. Graphics might be missing or ads don't load. I'm almost sure it has something to do with DNS but I'm not sure if it might be the Mac or if it is something with the router.
Any thoughts would be appreciated. I'll try any reasonable suggestions...
Update: In response to a request for example sites:
- www.python.org - I noticed it a lot here but I follow a lot of hyperlinks
- Stackoverflow.com
- Google.com
- Weather.com
- Gmail.com
- Wikipedia.org
- My Graduate Schools' sites
It occurs intermittently and I know that it isn't the site because I can quickly access the site on my other computers. Also, if I refresh enough -- 3 to 4 times --, it will usually pull up the site.
Update: Based on feedback thus far, I tried dig
. I was having trouble with Ubuntu.com so I ran the dig on that. Here are the results:
frank-villasenors-macbook:Documents FrankV$ dig www.ubuntu.com
; <<>> DiG 9.6.0-APPLE-P2 <<>> www.ubuntu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60666
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.ubuntu.com. IN A
;; ANSWER SECTION:
www.ubuntu.com. 432 IN A 91.189.90.40
;; Query time: 24 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Oct 27 18:31:33 2009
;; MSG SIZE rcvd: 48
I than ran one on a web site that was working (my blog) and here are the results:
frank-villasenors-macbook:mozilla-central-working FrankV$ dig www.theopensourceu.com
; <<>> DiG 9.6.0-APPLE-P2 <<>> www.theopensourceu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37084
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.theopensourceu.com. IN A
;; ANSWER SECTION:
www.theopensourceu.com. 3600 IN CNAME theopensourceu.com.
theopensourceu.com. 3148 IN A 68.178.232.55
;; Query time: 98 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Oct 27 18:33:40 2009
;; MSG SIZE rcvd: 70
They look similar; I don't think this is telling me anything (right now)... Just before submitting this, I refreshed my Ubuntu.com window and the site came up... Perhaps the dig
fixed it?
Update (11/17/2009): I'm still having trouble with this here and there. One additional thing I've noticed is that sometimes the DNS lookups simply take longer than I would expect. For example, if I attempt to go to Superuser.com the web browser (I generally use FireFox) will show the loading screen for 30 to 45 seconds. It could be longer and it could be shorter but at that point sometimes the site eventually loads and sometimes I receive the aforementioned error message.
In case there is question, I have a broadband internet connection (by Comcast in Chicagoland) which generally reports speeds of around 5mbps. Again, I only see this issue on the MacBook. I also have two Vista based computers and a Ubuntu based computer which do not present this problem.
In Firefox, "Server not found" tells you it does not know its IP address†. So, DNS problems indeed.
When you encounter this problem again you can immediately try to see if other DNS servers would give different results. So, do not refresh your browser, do not flush the cache, but run the following (like you already did) to tell you what your current DNS server knows about the troublesome domain. When you get an answer for the following then the test kind of failed, but maybe the following does not give you a useful reply at all:
dig www.python.org [..] ;; ANSWER SECTION: www.python.org. 33592 IN A 82.94.164.162 [..] ;; Query time: 168 msec [..] ;; WHEN: Sat Nov 14 12:56:54 2009
The above results might have been cached by your router/modem, or were delegated to your ISP's DNS server for anything the router did not yet know. The value for Query time
might be some indication if the result was cached in the modem/router or not. So, run that very same command again (press arrow-up and Return in Terminal):
;; Query time: 33 msec [..] ;; WHEN: Sat Nov 14 12:57:14 2009
Above, seeing 168 versus 33 milliseconds, we can assume that the result for the first dig
command was not cached in the modem/router, and asking the provider's DNS server took some extra time. The second request probably was cached.
If the query times differ a lot for you as well, then for some reason your browser or OS had not requested that domain from the DNS yet, even though your browser was trying to show that page. That would probably tell you the computer's DNS is messed up (which makes sense, as other computers using the same modem/router do not suffer the same issue).
Next, check if, for example, OpenDNS yields other results:
dig @208.67.222.222 www.python.org [..] ;; ANSWER SECTION: www.python.org. 83166 IN A 82.94.164.162
Above, the results are the same, but your mileage may vary. (You only need to compare IP addresses; when explicitly using some DNS server, like by using @208.67.222.222
, then the query times will not be much different for repeated requests.)
So, whenever this happens again: let us know the results of the above? Alternatively, just set up your Mac to use the OpenDNS servers for a while, and see if the problem still occurs then?
† Non-responding servers would give you "The connection has timed out", and it probably takes much longer to show that error.
I fix this issue by setting network.dns.disablePrefetch to true
http://kb.mozillazine.org/Error_loading_websites#DNS_prefetching
This is a know issue, there is a bug in mDNSResponder (there are plenty of posts in discussions.apple.com), some others already opened a bug in Apple, we don't know if they will deliver it in 10.6.3, as this bug is not massive, but depends on the ISP's DNS server (even if you set the OpenDNS servers, it will not change the situation, as a second bug in mDNSResponder mess up with the order of DNS servers it has in list, and even if you "force" it to use the OpenDNS, it will get the one "offered" by the default gateway, which is the one provided by your ISP, which is the one matching with the first bug). I have the some problem and there is no solution at the moment, downgrade to Leopard or wait for 10.6.3 (...or ask your ISP to change/update their DNS Server)...
Another alternative is to create "in LAN" a proxy... in that way it should work (it seems for someone, as you will see from the posts in discussions...). I'll wait 10.6.3 even if I'm not sure they will fix it 100%, are a couple of tricky bugs and not easy to replicate and solve.
bye gpy