37signals/pow — Issue #238: DNS cache problem on OS X Lion 10.7.2
Author: pnc
Created: 2011-10-20 13:22:13+00:00
State: open

Great news, everyone! Pow seems to be working super-well on Mac OS 10.7.2.

I did run into two small snags during installation, which I assume are related.

Immediately after being prompted for privilege elevation by networksettings (the dialog, not the sudo prompt), my AirPort turned off and had to be manually reenabled.

After I turned it back on, Pow, my application, and the rest of the internet seemed to be working fine. However, I tried to pull from GitHub and received this message:

pcalvin@nebula $ git pull origin rez-ui
You don't exist, go away!
fatal: The remote end hung up unexpectedly

This seemed like the sort of message you'd get if `github.com` was being resolved as `localhost`, so I tried that:

pcalvin@nebula ~/global-driver-2 (rez-ui☭) ssh git@localhost
You don't exist, go away!

Sure enough—same message. Manually resolving `github.com` against Pow's local DNS server yielded an NXDOMAIN, which is what I assume it should do and did not jive with my hypothesis that Pow was responding on behalf of `github.com`:

pcalvin@nebula $ dig -p 20560 @localhost github.com
;; Warning: Message parser reports malformed message packet.

; <<>> DiG 9.7.3-P3 <<>> -p 20560 @localhost github.com
; (3 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18901
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;github.com.	IN	A

I figured it was a resolver cache problem and cleared it:

pcalvin@nebula $ dscacheutil -flushcache

Which got GitHub working again.

Has anyone else done a fresh install on 10.7.2 with only AirPort connected and seen a problem like this?

I may have attempted a request to GitHub.com while my machine was offline. This may have warmed the cache with a bad entry. I'm not sure if Pow's DNS server is glommier when the machine can't access a real DNS server.