Netflix/chaosmonkey · error

not terminating: could not retrieve location

Error message

not terminating: could not retrieve location

What it means

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.

Source

Thrown at term/term.go:149

		return nil
	}

	if appCfg.Whitelist != nil {
		log.Printf("not terminating: app=%s has a whitelist which is no longer supported", appName)
		return nil
	}

	instance, ok := PickRandomInstance(group, *appCfg, d.Dep)
	if !ok {
		log.Printf("No eligible instances in group, nothing to terminate: %+v", group)
		return nil
	}

	log.Printf("Picked: %s", instance)

	loc, err := d.MonkeyCfg.Location()
	if err != nil {
		return errors.Wrap(err, "not terminating: could not retrieve location")
	}

	trm := chaosmonkey.Termination{Instance: instance, Time: d.Cl.Now(), Leashed: leashed}

	//
	// Check that we don't violate min time between terminations
	//
	err = d.Checker.Check(trm, *appCfg, d.MonkeyCfg.EndHour(), loc)
	if err != nil {
		return errors.Wrap(err, "not terminating: check for min time between terminations failed")
	}

	//
	// Record the termination with configured trackers
	//
	for _, tracker := range d.Trackers {
		err = tracker.Track(trm)
		if err != nil {

View on GitHub (pinned to eaa28fb761)

Solutions

  1. Set a valid 'location' string in the chaosmonkey config
  2. Fix underlying config read errors (bad types, missing keys)
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at term/term.go:149 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Netflix/chaosmonkey@eaa28fb761 (2026-09-03). Data as JSON: /api/errors/a2e770ce6eca0899. Report an issue: GitHub.