{"record":{"id":"51884d4fbb9f1ab0","repo":"juanfont/headscale","slug":"creating-tailscale-node-version-s-w","errorCode":null,"errorMessage":"creating tailscale node (version: %s): %w","messagePattern":"creating tailscale node \\(version: (.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/scenario.go","lineNumber":602,"sourceCode":"\t\t\tClients: make(map[string]TailscaleClient),\n\t\t}\n\t\ts.mu.Unlock()\n\n\t\treturn u, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"creating user: %w\", errNoHeadscaleAvailable)\n}\n\n/// Client related stuff\n\nfunc (s *Scenario) CreateTailscaleNode(\n\tversion string,\n\topts ...tsic.Option,\n) (TailscaleClient, error) {\n\theadscale, err := s.Headscale()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating tailscale node (version: %s): %w\", version, err)\n\t}\n\n\tcert := headscale.GetCert()\n\thostname := headscale.GetHostname()\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\topts = append(\n\t\topts,\n\t\ttsic.WithCACert(cert),\n\t\ttsic.WithHeadscaleName(hostname),\n\t)\n\n\ttsClient, err := tsic.New(\n\t\ts.pool,\n\t\tversion,\n\t\topts...,","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/scenario.go#L584-L620","documentation":"Returned by Scenario.CreateTailscaleNode when s.Headscale() fails: the node cannot be created because the control server's TLS cert and hostname (needed to configure the tailscale client container) are unavailable. Wraps the headscale availability error, annotated with the requested client version.","triggerScenarios":"Calling CreateTailscaleNode(version, opts...) when the headscale container never started or was torn down, so GetCert/GetHostname cannot be sourced.","commonSituations":"Earlier headscale startup failure; test creating nodes after Shutdown; the version string pointing to an unavailable client image is NOT this error's cause (that fails later in tsic.New).","solutions":["Fix headscale availability first: inspect scenario.Headscale() error and control container logs","Ensure node creation happens while the scenario is live","Run the environment doctor and retry via `go run ./cmd/hi run`"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, err := scenario.Headscale(); err != nil {\n    t.Fatalf(\"control server unavailable, cannot create node: %v\", err)\n}","typeGuard":null,"tryCatchPattern":"node, err := scenario.CreateTailscaleNode(version, opts...)\nif err != nil {\n    t.Fatalf(\"node (version %s) not created: %v\", version, err)\n}","preventionTips":["Bring up the control server before any client nodes","The version in the message identifies the client image — check availability separately"],"tags":["tailscale","node","headscale","integration-test"],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}