Skip to content

DNS health check logic is invalid when client is not set to "Use Tailscale DNS" #18436

Closed

Description

@luckman212

✅ Update 2026-02-11

As of 1.95.90 unstable, I can no longer reproduce this bug!


Continuation of #18146 which was prematurely closed

During my initial testing, Tailscale 1.95.65 (unstable) seemed to have solved this. Sadly, while the behavior is different, I am still facing this issue.

The original repro no longer triggers the healthcheck, however a very simple A query for a non-existent domain will cause it. Also, it never self corrects out of this state.

dig A xyzzy.foo @100.100.100.100

Updated repro video just captured with 1.95.65:

tsbug_1.95.65_m.mp4

Tailscale versions affected

  • 1.95.75 unstable
  • 1.94.1 stable
  • all other prior versions (both stable and unstable) released since 2025-03

Summary

If MagicDNS is enabled on the Tailnet, and the client elects to NOT "Use Tailscale DNS" via the setting below:

Image

...and instead chooses to use a native method of routing DNS queries, which could be:

  • custom resolver file at /etc/resolver/
  • manual entries in /etc/hosts
  • some other method outside of Tailscale

e.g. I'm routing requests for *.ts.net to 100.100.100.100 using a DNS override at /etc/resolver/yak-stargazer.ts.net, the contents of which are:

nameserver 100.100.100.100

...we get a Healthcheck warning appearing after 15 seconds for ANY query to *.ts.net:

$ tailscale status --json | jq -r '.Health'
[
  "Tailscale can't reach the configured DNS servers. Internet connectivity may be affected."
]

source to the tsbug script used below

$ tsbug
elapsed: [  0s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  1s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  2s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  3s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  4s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  5s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  6s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  7s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  8s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [  9s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [ 10s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [ 11s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [ 12s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
elapsed: [ 14s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
Tailscale can't reach the configured DNS servers. Internet connectivity may be affected.
elapsed: [ 15s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
Tailscale can't reach the configured DNS servers. Internet connectivity may be affected.
elapsed: [ 16s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
Tailscale can't reach the configured DNS servers. Internet connectivity may be affected.
elapsed: [ 17s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
Tailscale can't reach the configured DNS servers. Internet connectivity may be affected.
elapsed: [ 18s]  querying pdm.yak-stargazer.ts.net using dscacheutil: ip_address: 100.69.153.96
^C

I drew a rough flowchart of how I think the DNS healthcheck logic should be changed in order to fix this:

Image

Activity

  1. changed the title [-]DNS health check logic is invalid when client is set to not Use Tailscale DNS[/-] [+]DNS health check logic is invalid when client is not set to not Use Tailscale DNS"[/+] on Jan 17, 2026
  2. changed the title [-]DNS health check logic is invalid when client is not set to not Use Tailscale DNS"[/-] [+]DNS health check logic is invalid when client is not set to "Use Tailscale DNS"[/+] on Jan 17, 2026
  3. self-assigned this
    on Jan 19, 2026
  4. barnstar commented on Jan 19, 2026

    @barnstar
    Member

    Ahh. We opted skip the DNS health warnings in the GUI, but they are still generated internally. I'll take another look.

  5. luckman212 commented on Jan 22, 2026

    @luckman212
    Author

    Thank you. Happy to test whenever there's a build available.

  6. zapovit commented on Jan 25, 2026

    @zapovit

    Wanted to document here that I am seeing slightly different behaviour: all clients accept DNS, except the DNS server itself. However, I get the same error no matter whether I accept or do not accept tailscale DNS settings on the DNS server. Copied from the closed bug report. Error starts up after about an hour, but no connectivity issues exist, client queries appear on the server, etc. MagicDNS is enabled. Also want to note this error is visible on android client 1.92.3 (little red exclamation icon)

    • bug report id from client with --accept-dns=true set on tailnet DNS server: BUG-32e299da915cca24c753fded6fc0578ff86cb68cc53a328dbed52ebec0dd3528-20260125010818Z-2d50a5aa98313666
    • bug report id from client with --accept-dns=false set on tailnet DNS server: BUG-32e299da915cca24c753fded6fc0578ff86cb68cc53a328dbed52ebec0dd3528-20260125034636Z-c240a1de9ee50a0e
  7. lmagyar commented on Jan 26, 2026

    @lmagyar
    Contributor

    My comment from #18146:

    TLDR: Without any external query, when accept_dns is disabled, TS "provokes" these log lines and health state on it's own in each hour also.

    I've made some experiment, I've put a dnsmasq proxy in front of 100.100.100.100, plus with iptables black magic any query directed to 100.100.100.100 went through this proxy, and there were nothing directed to 100.100.100.100 (nothing logged by the dnsmasq proxy), but in each hour there were these lines in the logs:

    2026/01/18 08:44:31 [RATELIMIT] format("dns: resolver: forward: no upstream resolvers set, returning SERVFAIL") (1 dropped)
    2026/01/18 08:44:31 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/01/18 08:44:31 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/01/18 08:44:31 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/01/18 08:44:31 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/01/18 08:44:31 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/01/18 08:44:31 [RATELIMIT] format("dns: resolver: forward: no upstream resolvers set, returning SERVFAIL")
    

    I've tried to search for (in my LAN routers logs), what TS queried at this time (I assume after 100.100.100.100 weren't able to answer, the query, it went through the normal OS resolv.conf "path"), but couldn't figure out.

  8. luckman212 commented on Jan 26, 2026

    @luckman212
    Author

    I remember scouring the codebase once looking for hostnames and only found a few, so guessing it was one of:

    controlplane.tailscale.com
    log.tailscale.com
    login.tailscale.com
    console.tailscale.com
    api.tailscale.com
    derpN.tailscale.com
    
  9. lmagyar commented on Jan 26, 2026

    @lmagyar
    Contributor

    As far as I remember, I've checked those.

    Oh, there are other urls, like "acme-v02.api.letsencrypt.org", serve/funnel uses this. UPDATE: And I haven't checked that. :(

  10. lmagyar commented on Jan 28, 2026

    @lmagyar
    Contributor

    FYI: v1.94.1: the hourly SERVFAIL lines are still there.

  11. luckman212 commented on Jan 29, 2026

    @luckman212
    Author

    So is 1.95.36 unstable

  12. added a commit that references this issue on Jan 30, 2026
    cbd6998
  13. luckman212 commented on Feb 1, 2026

    @luckman212
    Author

    I saw the PR referenced above (looks like the test harnesses haven't quite caught up). Looking forward to testing this, thank you so much @barnstar

    Hopefully this will show up in the next unstable build.

  14. added 3 commits that reference this issue on Feb 2, 2026
    94db30d
    030b26c
    bcad3bb
  15. luckman212 commented on Feb 5, 2026

    @luckman212
    Author

    Today's unstable build (1.95.65) seems to have finally resolved this issue! I'll keep testing, but looking good so far.

    Initially, Tailscale 1.95.65 seemed to have solved this, but after extended use, the warning/healthcheck returned. It no longer appears after 15 seconds, but it is easily reproduces by executing a query for a nonexistent domain (see top post/video).

  16. luckman212 commented on Feb 5, 2026

    @luckman212
    Author

    @barnstar please take a look at the new video and updated top post.

  17. lmagyar commented on Feb 5, 2026

    @lmagyar
    Contributor

    please take a look at the new video and updated top post.

    There's a typo: it's 2026. now ;)

  18. lmagyar commented on Feb 7, 2026

    @lmagyar
    Contributor

    v1.95.75

    The hourly SERVFAIL messages and health warning are also still there.

    Without any incoming requests, tailscaled does it on it's own.

  19. added a commit that references this issue on Feb 10, 2026
    086968c
  20. luckman212 commented on Feb 10, 2026

    @luckman212
    Author

    @barnstar @cmol I saw the issue got closed, I am still facing this issue as of 1.95.75 unstable - does that build contain the fixes in #18572 ? If it does, I kindly request this issue to be re-opened as it is still happening...

  21. luckman212 commented on Feb 11, 2026

    @luckman212
    Author

    Exactly 326 days after filing the original report, I'm overjoyed to report that as of 1.95.90 unstable, I can no longer reproduce this bug! Thank you @barnstar + @cmol for hanging in there on this one.

  22. lmagyar commented on Feb 11, 2026

    @lmagyar
    Contributor

    UPDATE: It was a false alarm. See: #18436 (comment)

    I'm sorry to ruin the party, but it is still not fixed in v1.95.90.

    The hourly SERVFAIL lines are still there, though at least the health state is clear.

    2026/02/11 21:44:27 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/02/11 21:44:27 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/02/11 21:44:27 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/02/11 21:44:27 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    2026/02/11 21:44:27 dns: resolver: forward: no upstream resolvers set, returning SERVFAIL
    
  23. zapovit commented on Feb 15, 2026

    @zapovit

    with all my devices running 1.94.1 I can no longer reproduce this issue (with the apparent exception of the android client software...). But would be interesting to know what is going on with @lmagyar 's findings

    Bug report from android client:
    BUG-32e299da915cca24c753fded6fc0578ff86cb68cc53a328dbed52ebec0dd3528-20260215211752Z-b4346a822caacf99

  24. lmagyar commented on Feb 26, 2026

    @lmagyar
    Contributor

    But would be interesting to know what is going on with @lmagyar's findings

    It was false alarm.

    It was running in Home Assistant's docker environment, and HA's Supervisor makes an hourly check through another interface than I was logging. And I wasn't aware of this "health check". I made a workaround for this, and it seems all the SERVFAIL lines are disappeared.

  25. zapovit commented on Apr 24, 2026

    @zapovit
    Image

    Seems the issue still persists...

    BUG-32e299da915cca24c753fded6fc0578ff86cb68cc53a328dbed52ebec0dd3528-20260424014537Z-5ce4e5af15c42432

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions