hashicorp/nomad · error

job lookup failed: %v

Error message

job lookup failed: %v

What it means

The memdb read of the jobs table by namespace/ID failed while registering the job; this wraps the underlying index lookup error used to detect an existing job, indicating a state store access failure.

Source

Thrown at nomad/state/state_store.go:1824

	} else if !exists {
		return fmt.Errorf("job %q is in nonexistent namespace %q", job.ID, job.Namespace)
	}

	// Upgrade path.
	// Assert the node pool is set and exists.
	if job.NodePool == "" {
		job.NodePool = structs.NodePoolDefault
	}
	if exists, err := s.nodePoolExists(txn, job.NodePool); err != nil {
		return err
	} else if !exists {
		return fmt.Errorf("job %q is in nonexistent node pool %q", job.ID, job.NodePool)
	}

	// Check if the job already exists
	existing, err := txn.First("jobs", "id", job.Namespace, job.ID)
	if err != nil {
		return fmt.Errorf("job lookup failed: %v", err)
	}

	var existingJob *structs.Job
	if existing != nil {
		existingJob = existing.(*structs.Job)
	}

	if req != nil && req.EnforceIndex {
		if err := existingJob.EnforceIndex(req.JobModifyIndex); err != nil {
			return err
		}
	}

	// Setup the indexes correctly
	if existingJob != nil {
		job.CreateIndex = existingJob.CreateIndex
		job.ModifyIndex = index

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Retry the registration
  2. Check server logs for state store/memdb errors
  3. Verify the server is a healthy leader or forward to one
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nomad/state/state_store.go:1824 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/56d459e2efd4fc74. Report an issue: GitHub.