{"record":{"id":"9f2227874b8dcef4","repo":"kubernetes/kops","slug":"kops-controller-returned-status-code-d-s","errorCode":null,"errorMessage":"kops-controller returned status code %d: %s","messagePattern":"kops-controller returned status code (.+?): (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/kopscontrollerclient/client.go","lineNumber":178,"sourceCode":"\t\tif response.Body != nil {\n\t\t\tresponse.Body.Close()\n\t\t}\n\t\tos.Exit(0)\n\t}\n\n\tif response.Body != nil {\n\t\tdefer response.Body.Close()\n\t}\n\n\tif response.StatusCode != http.StatusOK {\n\t\tdetail := \"\"\n\t\tif response.Body != nil {\n\t\t\tscanner := bufio.NewScanner(response.Body)\n\t\t\tif scanner.Scan() {\n\t\t\t\tdetail = scanner.Text()\n\t\t\t}\n\t\t}\n\t\treturn fmt.Errorf(\"kops-controller returned status code %d: %s\", response.StatusCode, detail)\n\t}\n\n\treturn json.NewDecoder(response.Body).Decode(resp)\n}\n\nfunc (b *Client) Close() {\n\tif b.httpClient != nil {\n\t\tb.httpClient.CloseIdleConnections()\n\t}\n}\n","sourceCodeStart":160,"sourceCodeEnd":189,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/kopscontrollerclient/client.go#L160-L189","documentation":"kops-controller answered the bootstrap request with a non-OK, non-Conflict status; the first line of the response body is included as detail. Conflict is handled separately (graceful exit), so this is a server-side rejection such as 403 for an untrusted node token.","triggerScenarios":"Thrown at pkg/kopscontrollerclient/client.go:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Map the status code: 403 usually means the node's token was rejected (clock skew, unknown signing key)","Check kops-controller logs for the rejected request","Re-run nodeup on the node after fixing the cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}