hashicorp / hashicorp/nomad

Failure to schedule task: the container name is already in use by container

Open
#24,940 4 comments 0 reactions 0 assignees View on GitHub
hcc/jira stage/waiting-reply type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version

v1.9.5 but was happening with v1.9.1. Also this never happens on windows and those hosts are running v1.7.7

### Docker version

Docker version 27.5.1, build 9f9e405

### Operating system and Environment details

22.04.5 LTS (Jammy Jellyfish)

### Issue

Jobs fail intermittently with:

```
failed to create container: Error response from daemon: Conflict. The container name "/build-6cc59855-66d6-6db4-9e87-0e3a6c669e88" is already in use by container "e0c1fd8704656777b88eb06bd01637e348ee1909dcb6c2384a6ad849f8b8b9cb". You have to remove (or rename) that container to be able to reuse that name.
```

Seems to be the same as an older issue: https://github.com/hashicorp/nomad/issues/2084

### Reproduction steps

Unclear. We run hundreds or thousands of batch jobs per day and an unknown percentage of them fail with this error.

![Image](https://github.com/user-attachments/assets/feadd5da-61e2-4ac9-bf89-b4700c8828ed)

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named, and the reproduction steps are explicitly unclear. Start by reviewing the failure details, Docker and Nomad versions, and the older issue #2084, then correlate the conflicting container names with failed batch jobs. Done means the intermittent container-name conflict is reproduced and its cause is identified with a verified fix or regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.