Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tailscaled dns: error: upstream nameservers not set #3848

Closed
christopher-cavnue opened this issue Jan 31, 2022 · 9 comments
Closed

tailscaled dns: error: upstream nameservers not set #3848

christopher-cavnue opened this issue Jan 31, 2022 · 9 comments

Comments

@christopher-cavnue
Copy link

What is the issue?

many, many of these messages.

Jan 30 16:53:56 field-be-002-nx2 tailscaled dns: error: upstream nameservers not set
Jan 30 16:53:56 field-be-002-nx2 tailscaled dns: error: upstream nameservers not set
Jan 30 16:53:56 field-be-002-nx2 tailscaled [RATELIMIT] format("dns: error: %v")

cavnue@field-be-002-nx2:$ sudo tailscale bugreport
BUG-7346ad9239ae6805630a693592f8fed31b0357f26255f1263fff2fe217a386d9-20220131005448Z-f082a39f8b09848d
cavnue@field-be-002-nx2:
$

Steps to reproduce

not sure

Are there any recent changes that introduced the issue?

no.

OS

Linux

OS version

18.04.5 LTS on aarch64

Tailscale version

1.20.1

Bug report

BUG-7346ad9239ae6805630a693592f8fed31b0357f26255f1263fff2fe217a386d9-20220131005448Z-f082a39f8b09848d

@cepera-ang
Copy link

I have seen this error too. After checking "Override local DNS" in MagicDNS settings it went away (but this feels more like workaround than actual investigation and solution).

@DentonGentry
Copy link
Contributor

DentonGentry commented Jan 31, 2022

Looking at BUG-7346ad9239ae6805630a693592f8fed31b0357f26255f1263fff2fe217a386d9-20220131005448Z-f082a39f8b09848d

The first time we see "upstream nameservers not set"

2022-01-25 15:15:24.532245135 +0000 UTC: wgengine: Reconfig: configuring DNS
2022-01-25 15:15:24.532466288 +0000 UTC: dns: Set: {DefaultResolvers:[] Routes:{example.com.beta.tailscale.net.:[]}+65arpa SearchDomains:[example.com.beta.tailscale.net.] Hosts:9}
...
2022-01-25 15:15:28.032957519 +0000 UTC: dns: error: upstream nameservers not set
2022-01-25 15:15:28.033503187 +0000 UTC: dns: error: upstream nameservers not set

Prior to that, tailscaled had just started and appears to have had no network connectivity at first:

2021-07-21 18:51:41.125982034 +0000 UTC: Program starting: v1.20.1-t6dbdbb41a-g41b221f94, Go 1.17.6-tse44d304e54: []string{"/usr/sbin/tailscaled", "--cleanup"}
2021-07-21 18:51:41.127837374 +0000 UTC: LogID: 7346ad9239ae6805630a693592f8fed31b0357f26255f1263fff2fe217a386d9
2021-07-21 18:51:41.127876383 +0000 UTC: logpolicy: using system state directory "/var/lib/tailscale"
2021-07-21 18:51:41.129743276 +0000 UTC: logtail: dial "log.tailscale.io:443" failed: dial tcp: lookup log.tailscale.io on 127.0.0.53:53: server misbehaving (in 2ms), trying bootstrap...
2021-07-21 18:51:41.133995497 +0000 UTC: dns: [rc=resolved nm=no ret=systemd-resolved]
2021-07-21 18:51:41.13410481 +0000 UTC: trying bootstrapDNS("derp10.tailscale.com", "137.220.36.168") for "log.tailscale.io" ...
2021-07-21 18:51:41.134332236 +0000 UTC: creating dns cleanup: route ip+net: no such network interface
2021-07-21 18:51:41.134380652 +0000 UTC: flushing log.
2021-07-21 18:51:41.134420172 +0000 UTC: logger closing down
2021-07-21 18:51:41.13458843 +0000 UTC: bootstrapDNS("derp10.tailscale.com", "137.220.36.168") for "log.tailscale.io" error: Get "https://derp10.tailscale.com/bootstrap-dns?q=log.tailscale.io": dial tcp 137.220.36.168:443: connect: network is unreachable
2021-07-21 18:51:41.134652302 +0000 UTC: trying bootstrapDNS("derp5.tailscale.com", "2001:19f0:5801:10b7:5400:2ff:feaa:284c") for "log.tailscale.io" ...
2021-07-21 18:51:41.134935952 +0000 UTC: bootstrapDNS("derp5.tailscale.com", "2001:19f0:5801:10b7:5400:2ff:feaa:284c") for "log.tailscale.io" error: Get "https://derp5.tailscale.com/bootstrap-dns?q=log.tailscale.io": dial tcp [2001:19f0:5801:10b7:5400:2ff:feaa:284c]:443: connect: network is unreachable

This looks like it was using dns.DirectManager and /etc/resolv.conf contained no nameservers, because there was no connectivity, but we see it using resolved:

2022-01-25 18:14:49.471881538 +0000 UTC: dns: using *dns.resolvedManager

@christopher-cavnue
Copy link
Author

christopher-cavnue commented Jan 31, 2022 via email

@DentonGentry DentonGentry added L1 Very few Likelihood P3 Can't get started Priority level T5 Usability Issue type and removed needs-triage labels Feb 6, 2022
@DentonGentry
Copy link
Contributor

For those experiencing a problem with /etc/resolv.conf and detecting systemd-resolved, could you try installing from the unstable track https://pkgs.tailscale.com/unstable/ build 1.21.73 or later?

#3905 reorders some of the steps in tailscaled's startup process to try to ensure that systemd-resolved is initialized and ready to respond before tailscaled checks it.

@christopher-cavnue
Copy link
Author

christopher-cavnue commented Feb 12, 2022 via email

@DentonGentry
Copy link
Contributor

Fixed in 1.22 by better detecting systemd-resolved.

@cbeckr

This comment was marked as off-topic.

@cbeckr

This comment was marked as off-topic.

@DentonGentry

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants