Repository navigation
macOS: daemon leaves its resolver config in place after management disconnect, then cannot resolve management host to reconnect (self-deadlock) #8547
Replies: 2 comments
|
Your self-deadlock diagnosis is correct, and the source backs up both halves of it — so the fix you'd want to file is narrower than "don't depend on the system resolver". The resolver is only unwound on Stop
That confirms your reading: nothing in the current lifecycle restores the resolver on disconnect, so it isn't a race or a timing bug — the unwind simply isn't wired to that event. The management dialer
What to ask for, in priority order
(1) is the one I'd lead with; (3) is the one that reads as "the fix" but leaves the user-visible symptom intact. On the workaroundYour |
|
@kaovilai — confirming the diagnosis from source: If that matches, please mark the comment above as the answer — "resolver is only unwound on Stop" is the sentence that makes the fix obvious and the repro unnecessary. The narrow fix is to unwind on management disconnect too, rather than depending on the system resolver at all. |
Uh oh!
There was an error while loading. Please reload this page.
Description
NetBird client v0.82.0 on macOS (arm64, Darwin 25.6.0), running as a launchd service (
netbird service run), userspace interface. Management service hostname is DNS-backed (CDN/anycast-style, IP can change). A nameserver group pushes a private resolver + search domain into the system resolver while connected.When the daemon loses the management connection, the system resolver still points at the NetBird-managed resolver. With the tunnel down that resolver is unreachable, and macOS keeps using the primary resolver, so all system DNS resolution fails — including the daemon's own reconnect attempt:
The cycle repeats every ~30s indefinitely (hours in our case). The daemon never recovers on its own: the resolver config it installed is dead, and its management dialer depends entirely on that same system resolver to find the management host. Self-deadlock.
Side effect worth noting: because macOS keeps querying the dead primary resolver, this also takes down DNS for the whole system, not just NetBird.
Expected behavior
At least one of:
Workaround
Pin the current management IP in
/etc/hosts, flush the DNS cache (dscacheutil -flushcache+killall -HUP mDNSResponder). Daemon reconnects within a minute and DNS self-heals. Remove the pin afterwards since the management hostname is dynamic.Environment
Note
Responses generated with Claude (model: GLM 5.3)
All reactions