tailscale/tailscale · error

initial fetch failed %d: %.200s

Error message

initial fetch failed %d: %.200s

What it means

Raised in the map request when the initial POST to /machine/map responds with a non-200 status. The status and truncated body are included; control refused to start the map session, commonly due to an expired or unknown node key.

Source

Thrown at control/controlclient/direct.go:1187

		}
	}()

	req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewReader(bodyData))
	if err != nil {
		return err
	}
	ts2021.AddLBHeader(req, nodeKey)

	res, err := httpc.Do(req)
	if err != nil {
		vlogf("netmap: Do: %v", err)
		return err
	}
	vlogf("netmap: Do = %v after %v", res.StatusCode, time.Since(t0).Round(time.Millisecond))
	if res.StatusCode != 200 {
		msg, _ := io.ReadAll(res.Body)
		res.Body.Close()
		return fmt.Errorf("initial fetch failed %d: %.200s",
			res.StatusCode, strings.TrimSpace(string(msg)))
	}
	defer res.Body.Close()

	c.health.NoteMapRequestHeard(request)
	watchdogTimer.Reset(watchdogTimeout)

	if nu == nil {
		io.Copy(io.Discard, res.Body)
		return nil
	}

	if isStreaming && c.streamingMapSession != nil {
		panic("mapSession is already set")
	}

	sess := newMapSession(persist.PrivateNodeKey(), nu, c.controlKnobs)
	if isStreaming {

View on GitHub (pinned to 5201273aec)

Solutions

  1. Retry with backoff
  2. Re-authenticate if the server reports the node is unknown
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at control/controlclient/direct.go:1236 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@5201273aec (2026-08-18). Data as JSON: /api/errors/e9e01d726fae132b. Report an issue: GitHub.