{"record":{"id":"ff761bcdf66165cb","repo":"Netflix/chaosmonkey","slug":"http-get-failed-at-s","errorCode":null,"errorMessage":"http get failed at %s","messagePattern":"http get failed at (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spinnaker/config.go","lineNumber":32,"sourceCode":"\npackage spinnaker\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"github.com/Netflix/chaosmonkey/v2\"\n\n\t\"github.com/pkg/errors\"\n)\n\n// Get implements chaosmonkey.Getter.Get\nfunc (s Spinnaker) Get(app string) (c *chaosmonkey.AppConfig, err error) {\n\t// avoid expanding the response to avoid unneeded load\n\turl := s.appURL(app) + \"?expand=false\"\n\tresp, err := s.client.Get(url)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"http get failed at %s\", url)\n\t}\n\n\tdefer func() {\n\t\tif cerr := resp.Body.Close(); cerr != nil && err == nil {\n\t\t\terr = errors.Wrapf(err, \"body close failed at %s\", url)\n\t\t}\n\t}()\n\n\t// should return a 200\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"unexpected response code (%d) from %s\", resp.StatusCode, url)\n\t}\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"body read failed at %s\", url)\n\t}\n","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/spinnaker/config.go#L14-L50","documentation":"Spinnaker.Get fetches an application's config from the Spinnaker gate API (with ?expand=false). If the HTTP client GET itself fails (connection error, DNS failure, TLS problem, timeout), the error is wrapped as 'http get failed at <url>'. No config can be retrieved, so app evaluation aborts.","triggerScenarios":"s.client.Get(url) returns a transport-level error: Spinnaker gate unreachable, DNS resolution failure, TLS handshake error, connection refused/reset, or request timeout.","commonSituations":"Wrong gate URL configured; Spinnaker down or restarting; network/firewall rules blocking the monkey's egress; expired TLS certificates; DNS issues in the cluster where the monkey runs.","solutions":["Check the wrapped cause for the transport error (connection refused vs DNS vs TLS)","Verify the Spinnaker gate URL/host configured for Spinnaker is correct and reachable (curl the URL)","Confirm Spinnaker gate service is healthy and running","Check network/firewall/DNS from the monkey's runtime environment","If transient, add retry with backoff around config fetches"],"exampleFix":"// before\nresp, err := s.client.Get(url)\nif err != nil {\n    return nil, errors.Wrapf(err, \"http get failed at %s\", url)\n}\n// after (caller-side guard)\nif err := cfgGateReachable(spinnakerURL); err != nil {\n    log.Fatalf(\"spinnaker gate unreachable: %v\", err)\n}","handlingStrategy":"retry","validationCode":"// reachability probe before running the monkey\nresp, err := http.Get(gateBaseURL + \"/health\")\nif err != nil {\n    return fmt.Errorf(\"spinnaker gate unreachable at %s: %w\", gateBaseURL, err)\n}\nresp.Body.Close()","typeGuard":null,"tryCatchPattern":"cfg, err := getter.Get(app)\nif err != nil {\n    if strings.Contains(err.Error(), \"http get failed\") {\n        log.Printf(\"transport error fetching %s config, retrying: %+v\", app, err)\n        // retry with backoff\n    }\n    return err\n}","preventionTips":["Monitor Spinnaker gate health from the monkey's network segment","Configure the gate URL via a single, validated config value","Set client timeouts and retry with exponential backoff","Check TLS cert expiry for the gate endpoint proactively","Verify DNS resolution in the monkey's runtime environment"],"tags":["go","http","spinnaker","network"],"backgroundTag":"http-request-failed","analyzedSha":"eaa28fb761c0ebe8644d1333e5d164e9cc3071e9","analyzedAt":"2026-09-03T17:04:39.020Z","contentChangedAt":"2026-09-03T17:04:39.020Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}