Received error: PollNetMap: initial fetch failed 404: node not found

Hi,

I’m setting Tailscale on Fly.io following Tailscale on Fly.io · Tailscale and my logs are bombarded with

2022-11-05T14:48:58.540 app[f9fc49d9] lhr [info] 2022/11/05 14:48:58 Received error: PollNetMap: initial fetch failed 404: node not found

Here is the relevant snippet from Dockerfile:


FROM alpine:latest as tailscale
WORKDIR /app
COPY . ./
ENV TSFILE=tailscale_1.32.2_amd64.tgz
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && tar xzf ${TSFILE} --strip-components=1
COPY . ./

FROM ${RUNNER_IMAGE}

RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates iptables iproute2 \
  && apt-get clean && rm -f /var/lib/apt/lists/*_*


# Copy tailscale
COPY --from=tailscale /app/tailscaled /app/tailscaled
COPY --from=tailscale /app/tailscale /app/tailscale
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale


ADD deploy/start.sh /app/start.sh

ENTRYPOINT ["/app/start.sh"]

start.sh:

#!/bin/sh
/app/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock &
/app/tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=fly-app
/app/bin/server

/app/tailscale netcheck:

/app/tailscale netcheck

Report:
	* UDP: true
	* IPv4: yes, 205.234.240.75:37854
	* IPv6: yes, [2605:4c40:94:4de2:0:3ed9:ac22:1]:50279
	* MappingVariesByDestIP: false
	* HairPinning: false
	* PortMapping:

and logs

2022-11-05T14:43:56.112 runner[3ed9ac22] lhr [info] Starting virtual machine
2022-11-05T14:43:56.286 app[3ed9ac22] lhr [info] Starting init (commit: 81d5330)...
2022-11-05T14:43:56.329 app[3ed9ac22] lhr [info] Preparing to run: `/app/start.sh` as root
2022-11-05T14:43:56.365 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 listening on [fdaa:0:b8b9:a7b:8e:3ed9:ac22:2]:22 (DNS: [fdaa::3]:53)
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 logtail started
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Program starting: v1.32.2-t2f1a945ad-g07d934fd1, Go 1.19.2-ts3fd24dee31: []string{"/app/tailscaled", "--state=/var/lib/tailscale/tailscaled.state", "--socket=/var/run/tailscale/tailscaled.sock"}
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 LogID: f094bf9acc2ff9289eac1b9508a87caa272dc0785695749840da7f8c3e9355ca
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 logpolicy: using system state directory "/var/lib/tailscale"
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] logpolicy.ConfigFromFile /var/lib/tailscale/tailscaled.log.conf: open /var/lib/tailscale/tailscaled.log.conf: no such file or directory
2022-11-05T14:43:56.471 app[3ed9ac22] lhr [info] logpolicy.Config.Validate for /var/lib/tailscale/tailscaled.log.conf: config is nil
2022-11-05T14:43:56.472 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 wgengine.NewUserspaceEngine(tun "tailscale0") ...
2022-11-05T14:43:56.487 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 router: v6nat = true
2022-11-05T14:43:56.489 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 dns: [rc=unknown ret=direct]
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 dns: using *dns.directManager
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 link state: interfaces.State{defaultRoute=eth0 ifs={eth0:[172.19.4.50/29 172.19.4.51/29 2605:4c40:94:4de2:0:3ed9:ac22:1/127 fdaa:0:b8b9:a7b:8e:3ed9:ac22:2/112]} v4=true v6=true}
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 magicsock: disco key = d:1e59cb65fb66d880
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Creating WireGuard device...
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Bringing WireGuard device up...
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Bringing router up...
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Clearing router settings...
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Starting link monitor...
2022-11-05T14:43:56.491 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Engine created.
2022-11-05T14:43:56.492 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 external route: up
2022-11-05T14:43:56.498 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 envknob: PORT="8080"
2022-11-05T14:43:56.499 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Start
2022-11-05T14:43:56.500 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 using backend prefs; created empty state for "_daemon": Prefs{ra=true dns=true want=false routes=[] nf=on Persist=nil}
2022-11-05T14:43:56.500 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 generating new network-lock key
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 network-lock key written to store
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Backend: logs: be:f094bf9acc2ff9289eac1b9508a87caa272dc0785695749840da7f8c3e9355ca fe:
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Switching ipn state NoState -> NeedsLogin (WantRunning=false, nm=false)
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 blockEngineUpdates(true)
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 wgengine: Reconfig: configuring userspace WireGuard config (with 0/0 peers)
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 wgengine: Reconfig: configuring router
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 wgengine: Reconfig: configuring DNS
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 dns: Set: {DefaultResolvers:[] Routes:{} SearchDomains:[] Hosts:0}
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 dns: Resolvercfg: {Routes:{} Hosts:0 LocalDomains:[]}
2022-11-05T14:43:56.502 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 dns: OScfg: {Nameservers:[] SearchDomains:[] MatchDomains:[] Hosts:[]}
2022-11-05T14:43:56.503 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 health("overall"): error: state=NeedsLogin, wantRunning=false
2022-11-05T14:43:56.708 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 ipnserver: conn2: connection from userid 0; root has access
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Start
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: client.Shutdown()
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: client.Shutdown: inSendStatus=0
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: mapRoutine: quit
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: Client.Shutdown done.
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 using backend prefs; created empty state for "_daemon": Prefs{ra=true dns=true want=false routes=[] nf=on Persist=nil}
2022-11-05T14:43:56.714 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 generating new machine key
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 machine key written to store
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Backend: logs: be:f094bf9acc2ff9289eac1b9508a87caa272dc0785695749840da7f8c3e9355ca fe:
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Switching ipn state NoState -> NeedsLogin (WantRunning=true, nm=false)
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 blockEngineUpdates(true)
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 Reconfig(down): no changes made to Engine config
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 StartLoginInteractive: url=false
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: client.Login(false, 2)
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: LoginInteractive -> regen=true
2022-11-05T14:43:56.715 app[3ed9ac22] lhr [info] 2022/11/05 14:43:56 control: doLogin(regen=true, hasUrl=false)
2022-11-05T14:43:58.605 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: control server key from https://controlplane.tailscale.com: ts2021=[fSeS+], legacy=[nlFWp]
2022-11-05T14:43:58.605 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: Generating a new nodekey.
2022-11-05T14:43:58.606 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: RegisterReq: onode= node=[jrf5+] fup=false
2022-11-05T14:43:58.606 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: creating new noise client
2022-11-05T14:43:58.653 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: RegisterReq: got response; nodeKeyExpired=false, machineAuthorized=true; authURL=false
2022-11-05T14:43:58.654 app[f5c8b389] lhr [info] 2022/11/05 14:43:58 magicsock: 1 DERP-only peers (no discokey)
2022-11-05T14:43:58.653 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 blockEngineUpdates(false)
2022-11-05T14:43:58.654 app[f5c8b389] lhr [info] 2022/11/05 14:43:58 wgengine: Reconfig: configuring router
2022-11-05T14:43:58.672 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 active login: <obfuscated>@gmail.com
2022-11-05T14:43:58.677 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 Switching ipn state NeedsLogin -> Starting (WantRunning=true, nm=true)
2022-11-05T14:43:58.677 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: SetPrivateKey called (init)
2022-11-05T14:43:58.677 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 wgengine: Reconfig: configuring userspace WireGuard config (with 0/3 peers)
2022-11-05T14:43:58.677 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 wgengine: Reconfig: configuring router
2022-11-05T14:43:58.687 app[f5c8b389] lhr [info] 2022/11/05 14:43:58 wgengine: Reconfig: configuring userspace WireGuard config (with 1/3 peers)
2022-11-05T14:43:58.684 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 health("router"): error: setting up filter/ts-input: running [/usr/sbin/iptables -t filter -N ts-input --wait]: exit status 4: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument
2022-11-05T14:43:58.685 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 peerapi: serving on http://100.88.115.154:63093
2022-11-05T14:43:58.685 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 peerapi: serving on http://[fd7a:115c:a1e0:efe3::6458:739a]:63093
2022-11-05T14:43:58.687 app[f5c8b389] lhr [info] 2022/11/05 14:43:58 wgengine: Reconfig: configuring router
2022-11-05T14:43:58.927 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: home is now derp-8 (lhr)
2022-11-05T14:43:58.928 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: endpoints changed: 205.234.240.75:8080 (stun), [2605:4c40:94:4de2:0:3ed9:ac22:1]:8080 (stun), 172.19.4.50:8080 (local), 172.19.4.51:8080 (local)
2022-11-05T14:43:58.933 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: adding connection to derp-8 for home-keep-alive
2022-11-05T14:43:58.933 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: 1 active derp conns: derp-8=cr0s,wr0s
2022-11-05T14:43:58.933 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 Switching ipn state Starting -> Running (WantRunning=true, nm=true)
2022-11-05T14:43:58.937 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 control: NetInfo: NetInfo{varies=false hairpin=false ipv6=true udp=true icmpv4=false derp=#8 portmap= link=""}
2022-11-05T14:43:58.937 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 derphttp.Client.Connect: connecting to derp-8 (lhr)
2022-11-05T14:43:58.944 app[3ed9ac22] lhr [info] 2022/11/05 14:43:58 magicsock: derp-8 connected; connGen=1
2022-11-05T14:44:16.414 app[f9fc49d9] lhr [info] 2022/11/05 14:44:16 Received error: PollNetMap: initial fetch failed 404: node not found
2022-11-05T14:44:22.313 app[c243a0b6] lhr [info] 2022/11/05 14:44:22 Received error: PollNetMap: initial fetch failed 404: node not found
2022-11-05T14:44:24.404 app[e3598f36] lhr [info] 2022/11/05 14:44:24 Received error: PollNetMap: initial fetch failed 404: node not found