hashicorp/nomad · error · ErrPermissionDenied-path (returns plain error)
No such allocation on client, or allocation not eligible for
Error message
No such allocation on client, or allocation not eligible for GC
What it means
Sentinel error from the client's GarbageCollect RPC handler: CollectAllocation returned false, meaning the allocation ID does not exist on this client or the allocation is in a state (e.g. still running or not terminal) that makes it ineligible for garbage collection.
Source
Thrown at client/alloc_endpoint.go:71
defer metrics.MeasureSince([]string{"client", "allocations", "garbage_collect"}, time.Now())
alloc, err := a.c.GetAlloc(args.AllocID)
if err != nil {
return err
}
// Check namespace submit job permission.
if aclObj, err := a.c.ResolveToken(args.AuthToken); err != nil {
return err
} else if !aclObj.AllowNsOpAnyOf(alloc.Namespace,
acl.NamespaceCapabilitySubmitJob,
acl.NamespaceCapabilityGCAllocation,
) {
return nstructs.ErrPermissionDenied
}
if !a.c.CollectAllocation(args.AllocID) {
return fmt.Errorf("No such allocation on client, or allocation not eligible for GC")
}
return nil
}
// Signal is used to send a signal to an allocation's tasks on a client.
func (a *Allocations) Signal(args *nstructs.AllocSignalRequest, reply *nstructs.GenericResponse) error {
defer metrics.MeasureSince([]string{"client", "allocations", "signal"}, time.Now())
alloc, err := a.c.GetAlloc(args.AllocID)
if err != nil {
return err
}
// Check namespace alloc-lifecycle permission.
if aclObj, err := a.c.ResolveToken(args.AuthToken); err != nil {
return err
} else if !aclObj.AllowNsOp(alloc.Namespace, acl.NamespaceCapabilityAllocLifecycle) {View on GitHub (pinned to 482b49bf1a)
Solutions
- Verify the allocation ID is correct and was placed on this client node
- Wait until the allocation is terminal/finished before forcing GC
- List allocations on the node to confirm the ID exists locally
- Retry GC after the allocation's GC eligibility window passes
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at client/alloc_endpoint.go:71 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/9614c964eb5dd3c8.
Report an issue: GitHub.