{"record":{"id":"4a65f717ba127fb0","repo":"tailscale/tailscale","slug":"tailscaled-was-built-without-dns-q-support","errorCode":null,"errorMessage":"tailscaled was built without DNS %q support","messagePattern":"tailscaled was built without DNS %q support","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"net/dns/manager_linux.go","lineNumber":109,"sourceCode":"\tenv.nmVersionBetween, _ = optNMVersionBetween.GetOk() // GetOk to not panic if nil; unused if optNMIsUsingResolved returns an error\n\tmode, err := dnsMode(logf, health, env)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpublishOnce.Do(func() {\n\t\tsanitizedMode := strings.ReplaceAll(mode, \"-\", \"_\")\n\t\tm := clientmetric.NewGauge(fmt.Sprintf(\"dns_manager_linux_mode_%s\", sanitizedMode))\n\t\tm.Set(1)\n\t})\n\tlogf(\"dns: using %q mode\", mode)\n\tswitch mode {\n\tcase \"direct\":\n\t\treturn newDirectManagerOnFS(logf, health, bus, env.fs), nil\n\tcase \"systemd-resolved\":\n\t\tif f, ok := optNewResolvedManager.GetOk(); ok {\n\t\t\treturn f(logf, health, interfaceName)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"tailscaled was built without DNS %q support\", mode)\n\tcase \"network-manager\":\n\t\tif f, ok := optNewNMManager.GetOk(); ok {\n\t\t\treturn f(interfaceName)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"tailscaled was built without DNS %q support\", mode)\n\tcase \"debian-resolvconf\":\n\t\treturn newDebianResolvconfManager(logf)\n\tcase \"openresolv\":\n\t\treturn newOpenresolvManager(logf)\n\tdefault:\n\t\tlogf(\"[unexpected] detected unknown DNS mode %q, using direct manager as last resort\", mode)\n\t}\n\n\treturn newDirectManagerOnFS(logf, health, bus, env.fs), nil\n}\n\n// newOSConfigEnv are the funcs newOSConfigurator needs, pulled out for testing.\ntype newOSConfigEnv struct {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/net/dns/manager_linux.go#L91-L127","documentation":"Linux mode detection selected 'systemd-resolved', but the resolved-backed constructor was never registered: optNewResolvedManager is only Set() by an init() in net/dns/resolved.go, which is compiled unless the build tag 'ts_omit_resolved' (or 'android') excludes it. So this binary was intentionally built without systemd-resolved support yet the environment demands it.","triggerScenarios":"Building tailscaled with -tags ts_omit_resolved (or a vendored build like synology/qnap images that strip dbus deps) and then running on a host where /etc/resolv.conf points at 127.0.0.53 and mode detection returns 'systemd-resolved'.","commonSituations":"Custom minimal builds for appliances, tailscaled embedded in third-party products, cross-compiled images reused on regular distros, CI builds with restrictive tags.","solutions":["Rebuild without ts_omit_resolved (and ts_omit_dbus) so resolved support is compiled in","Or force a mode the binary supports: run tailscaled with the env/logic that selects 'direct' (e.g. replace resolv.conf with a non-resolved one or set TS_DEBUG_dns_mode if available in your tree)","Verify with the startup log line 'dns: using %q mode' which mode was chosen","If you ship stripped builds, document that hosts using systemd-resolved are unsupported"],"exampleFix":"# before\ngo build -tags ts_omit_resolved ./cmd/tailscaled\n# then run on a systemd-resolved host -> error\n\n# after\ngo build ./cmd/tailscaled\n# or keep the stripped build but force direct mode via env: TS_DEBUG_RESOLV_CONF=... / custom resolv.conf","handlingStrategy":"validation","validationCode":"// before selecting a mode, check the hook your build provides:\nif _, ok := optNewResolvedManager.GetOk(); !ok {\n\treturn errors.New(\"this build lacks resolved support; rebuild without ts_omit_resolved or force direct mode\")\n}","typeGuard":"func supportsResolved() bool { _, ok := optNewResolvedManager.GetOk(); return ok }","tryCatchPattern":null,"preventionTips":["Match build tags to deployment targets (no ts_omit_resolved on systemd distros)","Smoke-test built binaries for the modes they will encounter","Document stripped-build limitations to operators"],"tags":["linux","go","tailscale","build-tags","systemd-resolved","dns"],"backgroundTag":"feature-omitted-at-build-time","analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}