juanfont/headscale · error

logging out, stdout: %s, stderr: %s

Error message

logging out, stdout: %s, stderr: %s

What it means

Error "logging out, stdout: %s, stderr: %s" thrown in juanfont/headscale.

Source

Thrown at integration/tsic/tsic.go:770

	loginURL, err := util.ParseLoginURLFromCLILogin(stdout + stderr)
	if err != nil {
		return nil, err
	}

	return loginURL, nil
}

// Logout runs the logout routine on the given Tailscale instance.
func (t *TailscaleInContainer) Logout() error {
	_, _, err := t.Execute([]string{tailscaleBin, "logout"})
	if err != nil {
		return err
	}

	stdout, stderr, _ := t.Execute([]string{tailscaleBin, "status"})
	if !strings.Contains(stdout+stderr, "Logged out.") {
		return fmt.Errorf("logging out, stdout: %s, stderr: %s", stdout, stderr) //nolint:err113
	}

	return t.waitForBackendState("NeedsLogin", integrationutil.PeerSyncTimeout())
}

// Restart restarts the Tailscale container using Docker API.
// This simulates a container restart (e.g., docker restart or Kubernetes pod restart).
// The container's entrypoint will re-execute, which typically includes running
// "tailscale up" with any auth keys stored in environment variables.
func (t *TailscaleInContainer) Restart() error {
	if t.container == nil {
		return errContainerNotInitialized
	}

	// Use Docker API to restart the container
	err := t.pool.Client.RestartContainer(t.container.Container.ID, 30)
	if err != nil {
		return fmt.Errorf("restarting container %s: %w", t.hostname, err)

View on GitHub (pinned to 565fd254d0)

Solutions

  1. Inspect the wrapped error for the underlying cause and correct the failing condition (logging out, stdout); retry the operation after fixing the input, configuration, or environment.

Example fix

Inspect the wrapped error for the underlying cause and correct the failing condition (logging out, stdout); retry the operation after fixing the input, configuration, or environment.

When it happens

Trigger: Thrown at integration/tsic/tsic.go:770 when the library encounters an invalid state.

Common situations: 'tailscale logout' inside the container failed. The captured stdout/stderr show the client-side reason.


AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15). Data as JSON: /api/errors/40a017a7b1d56ca9. Report an issue: GitHub.