hashicorp/nomad · error

missing node ID for client status update

Error message

missing node ID for client status update

What it means

Guard in Node.UpdateStatus: the heartbeat/status request has an empty NodeID, so the client status update has no target node; typically a misconfigured client identity.

Source

Thrown at nomad/node_endpoint.go:699

	defer metrics.MeasureSince([]string{"nomad", "client", "update_status"}, time.Now())

	if aclObj, err := n.srv.ResolveACL(args); err != nil {
		return structs.ErrPermissionDenied
	} else {
		if aclObj.AllowServerOp() || args.GetIdentity().GetACLToken() == structs.LeaderACLToken {
			goto VERIFY_ARGS
		}

		if err := auth.AuthorizeSameNode(args.GetIdentity(), args.NodeID); err != nil {
			return err
		}
	}

VERIFY_ARGS:

	// Verify the arguments
	if args.NodeID == "" {
		return fmt.Errorf("missing node ID for client status update")
	}
	if !structs.ValidNodeStatus(args.Status) {
		return fmt.Errorf("invalid status for node")
	}

	// Look for the node
	snap, err := n.srv.fsm.State().Snapshot()
	if err != nil {
		return err
	}

	ws := memdb.NewWatchSet()
	node, err := snap.NodeByID(ws, args.NodeID)
	if err != nil {
		return err
	}
	if node == nil {
		return fmt.Errorf("node not found")

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Ensure the client loads its generated node ID from the data dir before issuing UpdateStatus
  2. Fix request construction to copy args.NodeID from the client's resolved identity
  3. Regenerate the client data dir so a valid node ID is created
  4. Check Nomad client logs for 'node ID' assignment errors at startup
Defensive patterns

Strategy: validation

Validate before calling

if args.NodeID == "" {
    return fmt.Errorf("node ID must be resolved before UpdateStatus")
}

Type guard

func statusUpdatable(id, status string) bool {
    return id != ""
}

Try / catch

_, err := client.Nodes().UpdateStatus(nodeID, status, nil)
if err != nil && strings.Contains(err.Error(), "missing node ID") {
    // client identity not yet resolved: re-register or fix request builder
}

Prevention

When it happens

Trigger: Client heartbeat/status RPC with NodeID empty — client started before its node ID was generated, or a wrapper built the request without copying NodeID.

Common situations: Custom clients/plugins implementing the heartbeat RPC incorrectly; config where node_id is templated but renders empty; proxy dropping fields.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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