{"record":{"id":"a2e770ce6eca0899","repo":"Netflix/chaosmonkey","slug":"not-terminating-could-not-retrieve-location","errorCode":null,"errorMessage":"not terminating: could not retrieve location","messagePattern":"not terminating: could not retrieve location","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"term/term.go","lineNumber":149,"sourceCode":"\t\treturn nil\n\t}\n\n\tif appCfg.Whitelist != nil {\n\t\tlog.Printf(\"not terminating: app=%s has a whitelist which is no longer supported\", appName)\n\t\treturn nil\n\t}\n\n\tinstance, ok := PickRandomInstance(group, *appCfg, d.Dep)\n\tif !ok {\n\t\tlog.Printf(\"No eligible instances in group, nothing to terminate: %+v\", group)\n\t\treturn nil\n\t}\n\n\tlog.Printf(\"Picked: %s\", instance)\n\n\tloc, err := d.MonkeyCfg.Location()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"not terminating: could not retrieve location\")\n\t}\n\n\ttrm := chaosmonkey.Termination{Instance: instance, Time: d.Cl.Now(), Leashed: leashed}\n\n\t//\n\t// Check that we don't violate min time between terminations\n\t//\n\terr = d.Checker.Check(trm, *appCfg, d.MonkeyCfg.EndHour(), loc)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"not terminating: check for min time between terminations failed\")\n\t}\n\n\t//\n\t// Record the termination with configured trackers\n\t//\n\tfor _, tracker := range d.Trackers {\n\t\terr = tracker.Track(trm)\n\t\tif err != nil {","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/term/term.go#L131-L167","documentation":"Fires in doTerminate after an eligible instance has been picked, when d.MonkeyCfg.Location() fails to return the configured location string needed to record the termination. The wrapped error comes from reading the location setting (missing or malformed config value); termination is aborted because the Termination record would be incomplete.","triggerScenarios":"Thrown at term/term.go:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a valid 'location' string in the chaosmonkey config","Fix underlying config read errors (bad types, missing keys)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}