tailscale/tailscale · error

error getting local client: %w

Error message

error getting local client: %w

What it means

Error "error getting local client: %w" thrown in tailscale/tailscale.

Source

Thrown at cmd/k8s-proxy/k8s-proxy.go:225

	ts := &tsnet.Server{
		Logf:     logger.Named("tsnet").Debugf,
		UserLogf: logger.Named("tsnet").Infof,
		Store:    st,
		AuthKey:  authKey,
	}

	if cfg.Parsed.ServerURL != nil {
		ts.ControlURL = *cfg.Parsed.ServerURL
	}

	if cfg.Parsed.Hostname != nil {
		ts.Hostname = *cfg.Parsed.Hostname
	}

	lc, err := ts.LocalClient()
	if err != nil {
		return fmt.Errorf("error getting local client: %w", err)
	}

	// Make sure we crash loop if Up doesn't complete in reasonable time.
	upCtx, upCancel := context.WithTimeout(ctx, 30*time.Second)
	defer upCancel()

	// ts.Up() deliberately ignores NeedsLogin because it fires transiently
	// during normal auth-key login. We can watch for the login-state health
	// warning here though, which only fires on terminal auth failure, and
	// cancel early.
	go func() {
		w, err := lc.WatchIPNBus(upCtx, ipn.NotifyInitialHealthState)
		if err != nil {
			return
		}
		defer w.Close()
		for {
			n, err := w.Next()

View on GitHub (pinned to cfe32b8be6)

When it happens

Trigger: Thrown at cmd/k8s-proxy/k8s-proxy.go:225 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@cfe32b8be6 (2026-08-15). Data as JSON: /api/errors/e448a7f16981c410. Report an issue: GitHub.