hashicorp/nomad · error

id %q was not found in the Raft configuration

Error message

id %q was not found in the Raft configuration

What it means

RaftRemovePeerByID could not find the supplied server ID in the current Raft configuration; since this operator endpoint is meant for humans, it refuses to remove an unknown peer as the ID is likely a mistake.

Source

Thrown at nomad/operator_endpoint.go:153

		return structs.ErrPermissionDenied
	}

	// Since this is an operation designed for humans to use, we will return
	// an error if the supplied id isn't among the peers since it's
	// likely a mistake.
	var address raft.ServerAddress
	{
		future := op.srv.raft.GetConfiguration()
		if err := future.Error(); err != nil {
			return err
		}
		for _, s := range future.Configuration().Servers {
			if s.ID == args.ID {
				address = s.Address
				goto REMOVE
			}
		}
		return fmt.Errorf("id %q was not found in the Raft configuration",
			args.ID)
	}

REMOVE:
	// The Raft library itself will prevent various forms of foot-shooting,
	// like making a configuration with no voters. Some consideration was
	// given here to adding more checks, but it was decided to make this as
	// low-level and direct as possible. We've got ACL coverage to lock this
	// down, and if you are an operator, it's assumed you know what you are
	// doing if you are calling this. If you remove a peer that's known to
	// Serf, for example, it will come back when the leader does a reconcile
	// pass.
	minRaftProtocol, err := op.srv.MinRaftProtocol()
	if err != nil {
		return err
	}

	var future raft.Future

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. List the actual peers (e.g. `nomad operator raft list-peers`) and use a valid server ID
  2. Check for typos in the ID argument
  3. Confirm you are querying the correct region/cluster
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nomad/operator_endpoint.go:153 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/8a327f2cac8a1ea6. Report an issue: GitHub.