Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container with name conflict not shown by docker ps -a #21412

Closed
robvelor opened this issue Mar 22, 2016 · 6 comments
Closed

Container with name conflict not shown by docker ps -a #21412

robvelor opened this issue Mar 22, 2016 · 6 comments

Comments

@robvelor
Copy link

Output of docker version:

Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 22:37:33 2016
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/1.1.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   7e9c6bd
 Built:        Wed Mar  2 00:15:12 UTC 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 12
 Running: 12
 Paused: 0
 Stopped: 0
Images: 60
Server Version: swarm/1.1.3
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 4
 dev-swarm-manager-1: 10.10.20.152:2376
  └ Status: Healthy
  └ Containers: 3
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 2.051 GiB
  └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-53-generic, operatingsystem=Ubuntu 14.04.2 LTS, provider=amazonec2, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-03-22T23:16:08Z
 dev-swarm-node-1: 10.10.20.181:2376
  └ Status: Healthy
  └ Containers: 4
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 2.051 GiB
  └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-53-generic, operatingsystem=Ubuntu 14.04.2 LTS, provider=amazonec2, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-03-22T23:15:55Z
 dev-swarm-node-2: 10.10.20.210:2376
  └ Status: Healthy
  └ Containers: 2
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 2.051 GiB
  └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-53-generic, operatingsystem=Ubuntu 14.04.2 LTS, provider=amazonec2, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-03-22T22:46:37Z
 dev-swarm-node-3: 10.10.20.216:2376
  └ Status: Healthy
  └ Containers: 3
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 2.051 GiB
  └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-53-generic, operatingsystem=Ubuntu 14.04.2 LTS, provider=amazonec2, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-03-22T23:15:57Z
Plugins: 
 Volume: 
 Network: 
Kernel Version: 3.13.0-53-generic
Operating System: linux
Architecture: amd64
CPUs: 4
Total Memory: 8.205 GiB
Name: ac2b7dd62d44

Additional environment details (AWS, VirtualBox, physical, etc.):
AWS EC2 instances created with docker-machine

Steps to reproduce the issue:

  1. eval $(docker-machine env --swarm dev-swarm-manager-1)
  2. docker-compose up -d
  3. docker ps -a (does not show the "duplicate" container)

Describe the results you received:
Conflict: The name [container_name_1] is already assigned. You have to delete (or rename) that container to be able to assign [container_name_1] to a container again.

Describe the results you expected:
Container should be created. docker ps -a does not reveal the existence of a container named [container_name_1].

Additional information you deem important (e.g. issue happens only occasionally):
Started happening consistently after calling docker-compose down and the decompose failed to stop and remove the [container_name_1] container. There was no error decomposing but the done message when stopping and removing was never shown. After that docker-compose up fails with the message above.

Perhaps this should go on compose or swarm projects, not sure yet, but as docker ps -a does not reveal the container holding the name I am filing this here. Please advice accordingly.

@HackToday
Copy link
Contributor

Could you show your both docker ps and docker ps -a output?

@robvelor
Copy link
Author

docker ps

CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                                                                                                                                                                                                                       NAMES
fa273aedea65        myregistry/rabbitmq:2                         "/docker-entrypoint.s"   17 hours ago        Up 17 hours         10.10.20.216:4369->4369/tcp, 10.10.20.216:5671-5672->5671-5672/tcp, 10.10.20.216:25672->25672/tcp                                                                                                                           dev-swarm-node-3/dev_rabbitmq_1
f7edc4afe51f        myregistry/elastic_search:3                   "/docker_entrypoint.s"   17 hours ago        Up 17 hours         10.10.20.181:9200->9200/tcp, 9300/tcp                                                                                                                                                                                       dev-swarm-node-1/dev_elasticsearch_1
714c2b7b1848        myregistry/web:514                        "./run.sh -e prod"       17 hours ago        Up 17 hours         10.10.20.181:3000->3000/tcp, 10.10.20.181:3030->3030/tcp, 10.10.20.181:3040->3040/tcp                                                                                                                                       dev-swarm-node-1/dev_web_1
f3a74b3ff45a        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.216:53->53/tcp, 10.10.20.216:8300-8302->8300-8302/tcp, 10.10.20.216:8400->8400/tcp, 10.10.20.216:8500->8500/tcp, 10.10.20.216:8300-8302->8300-8302/udp, 10.10.20.216:8600->8600/tcp, 10.10.20.216:8600->8600/udp   dev-swarm-node-3/consul_consul-agent_1
3579bf56ac59        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.210:53->53/tcp, 10.10.20.210:8300-8302->8300-8302/tcp, 10.10.20.210:8400->8400/tcp, 10.10.20.210:8500->8500/tcp, 10.10.20.210:8300-8302->8300-8302/udp, 10.10.20.210:8600->8600/tcp, 10.10.20.210:8600->8600/udp   dev-swarm-node-2/consul_consul-agent_1
05d73be54e19        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.181:53->53/tcp, 10.10.20.181:8300-8302->8300-8302/tcp, 10.10.20.181:8400->8400/tcp, 10.10.20.181:8500->8500/tcp, 10.10.20.181:8300-8302->8300-8302/udp, 10.10.20.181:8600->8600/tcp, 10.10.20.181:8600->8600/udp   dev-swarm-node-1/consul_consul-agent_1
7e863d961a55        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.152:53->53/tcp, 10.10.20.152:8300-8302->8300-8302/tcp, 10.10.20.152:8400->8400/tcp, 10.10.20.152:8500->8500/tcp, 10.10.20.152:8300-8302->8300-8302/udp, 10.10.20.152:8600->8600/tcp, 10.10.20.152:8600->8600/udp   dev-swarm-manager-1/consul_consul-agent_1

docker ps -a

CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                                                                                                                                                                                                                       NAMES
fa273aedea65        myregistry/rabbitmq:2                         "/docker-entrypoint.s"   17 hours ago        Up 17 hours         10.10.20.216:4369->4369/tcp, 10.10.20.216:5671-5672->5671-5672/tcp, 10.10.20.216:25672->25672/tcp                                                                                                                           dev-swarm-node-3/dev_rabbitmq_1
f7edc4afe51f        myregistry/elastic_search:3                   "/docker_entrypoint.s"   17 hours ago        Up 17 hours         10.10.20.181:9200->9200/tcp, 9300/tcp                                                                                                                                                                                       dev-swarm-node-1/dev_elasticsearch_1
714c2b7b1848        myregistry/web:514                        "./run.sh -e prod"       17 hours ago        Up 17 hours         10.10.20.181:3000->3000/tcp, 10.10.20.181:3030->3030/tcp, 10.10.20.181:3040->3040/tcp                                                                                                                                       dev-swarm-node-1/dev_web_1
f3a74b3ff45a        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.216:53->53/tcp, 10.10.20.216:8300-8302->8300-8302/tcp, 10.10.20.216:8400->8400/tcp, 10.10.20.216:8500->8500/tcp, 10.10.20.216:8300-8302->8300-8302/udp, 10.10.20.216:8600->8600/tcp, 10.10.20.216:8600->8600/udp   dev-swarm-node-3/consul_consul-agent_1
3579bf56ac59        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.210:53->53/tcp, 10.10.20.210:8300-8302->8300-8302/tcp, 10.10.20.210:8400->8400/tcp, 10.10.20.210:8500->8500/tcp, 10.10.20.210:8300-8302->8300-8302/udp, 10.10.20.210:8600->8600/tcp, 10.10.20.210:8600->8600/udp   dev-swarm-node-2/consul_consul-agent_1
05d73be54e19        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.181:53->53/tcp, 10.10.20.181:8300-8302->8300-8302/tcp, 10.10.20.181:8400->8400/tcp, 10.10.20.181:8500->8500/tcp, 10.10.20.181:8300-8302->8300-8302/udp, 10.10.20.181:8600->8600/tcp, 10.10.20.181:8600->8600/udp   dev-swarm-node-1/consul_consul-agent_1
7e863d961a55        gliderlabs/consul-agent                       "/bin/consul agent -c"   46 hours ago        Up 46 hours         10.10.20.152:53->53/tcp, 10.10.20.152:8300-8302->8300-8302/tcp, 10.10.20.152:8400->8400/tcp, 10.10.20.152:8500->8500/tcp, 10.10.20.152:8300-8302->8300-8302/udp, 10.10.20.152:8600->8600/tcp, 10.10.20.152:8600->8600/udp   dev-swarm-manager-1/consul_consul-agent_1
595c1a64419f        swarm:latest                                  "/swarm join --advert"   46 hours ago        Up 46 hours         2375/tcp                                                                                                                                                                                                                    dev-swarm-node-3/swarm-agent
53d7841d0cf3        swarm:latest                                  "/swarm join --advert"   46 hours ago        Up 46 hours         2375/tcp                                                                                                                                                                                                                    dev-swarm-node-2/swarm-agent
8e2628241cd2        swarm:latest                                  "/swarm join --advert"   47 hours ago        Up 47 hours         2375/tcp                                                                                                                                                                                                                    dev-swarm-node-1/swarm-agent
813dc3ff27bb        swarm:latest                                  "/swarm join --advert"   47 hours ago        Up 46 hours         2375/tcp                                                                                                                                                                                                                    dev-swarm-manager-1/swarm-agent
ac2b7dd62d44        swarm:latest                                  "/swarm manage --tlsv"   47 hours ago        Up 46 hours         2375/tcp, 10.10.20.152:3376->3376/tcp                                                                                                                                                                                       dev-swarm-manager-1/swarm-agent-master

I went to /var/lib/docker/containers on all nodes in the cluster and all containers shown by docker ps -a are accounted for, where else can the name of container be held?

@HackToday
Copy link
Contributor

hi, are you able to run other containers ? like busybox image ? If it is so, I think you'd b better check with swarm guys, I can see you environment have 3 swarm nodes and one manager, for container_name_1] name issue, need swarm guys check what went wrong about it.

@robvelor
Copy link
Author

@HackToday Yes no problem running a new container on the swarm cluster. This issue is a duplicate of #15311.

@thaJeztah
Copy link
Member

@robvelor looks similar indeed; let me close this one, to keep the discussion in a single place. But feel free to comment here after I've closed

@robvelor
Copy link
Author

robvelor commented Apr 7, 2016

Restarting the daemon seems to fix the issue. In my case I restarted the daemon on all the machines in the cluster. I will report back if I encounter this issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants