tailscale/tailscale · error

failed to get tailnet lock log: %v

Error message

failed to get tailnet lock log: %v

What it means

handleC2NDebugTKALog serves tailnet lock log entries to the control plane. It fires when TailnetLockLog returns an error other than 'not active', such as a chonk read failure, and responds 500 with the wrapped cause.

Source

Thrown at feature/tailnetlock/tailnetlock.go:50

	}

	logf := b.Logger()
	logf("c2n: %s %s received", r.Method, r.URL)

	limit := defaultC2NLogLimit
	limitStr := r.URL.Query().Get("limit")
	if limitStr != "" {
		if parsed, err := strconv.Atoi(limitStr); err == nil {
			limit = min(parsed, maxC2NLogLimit)
		}
	}

	updates, err := b.TailnetLockLog(limit)
	if ipnlocal.IsTailnetLockNotActive(err) {
		http.Error(w, "tailnet lock not active", http.StatusBadRequest)
		return
	} else if err != nil {
		http.Error(w, fmt.Sprintf("failed to get tailnet lock log: %v", err), http.StatusInternalServerError)
		return
	}
	resp, err := tslockjsonv1.LogResponse(updates)
	if err != nil {
		http.Error(w, fmt.Sprintf("failed to get tailnet lock log: %v", err), http.StatusInternalServerError)
		return
	}

	w.Header().Set("Content-Type", "application/json")
	jsonv1.NewEncoder(w).Encode(resp)
}

View on GitHub (pinned to 6e0912f979)

Solutions

  1. Check the tailnet lock log store and tailscaled logs; retry after restart.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at feature/tailnetlock/tailnetlock.go:50 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@6e0912f979 (2026-08-18). Data as JSON: /api/errors/9c8d77ea3959f72a. Report an issue: GitHub.