moby / moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
https://mobyproject.org/
Apache License 2.0
68.87k stars 18.67k forks source link

Docker socket fails to start container #20723

Closed Doooooo0o closed 1 year ago

Doooooo0o commented 8 years ago

Output of docker version:

root@mydockerserver:~ $ docker version
Client:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Thu Feb 11 19:09:42 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Thu Feb 11 19:0

Output of docker info:

root@mydockerserver:~ $ docker info
Containers: 17
 Running: 17
 Paused: 0
 Stopped: 0
Images: 192
Server Version: 1.10.1
Storage Driver: overlay
 Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.2.0-0.bpo.1-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.39 GiB
Name: mydockerserver
ID: SGL5:XTPA:ZT5U:B4K7:M7BR:GQXG:KJ6F:L5KN:OYBV:XISM:FQM3:NETW
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Provide additional environment details (AWS, VirtualBox, physical, etc.): Physical server, and my uname : 4.2.0-0.bpo.1-amd64 #1 SMP Debian 4.2.5-1~bpo8+1 (2015-11-02) x86_64 GNU/Linux

List the steps to reproduce the issue:

It's kind of random

Describe the results you received:

Feb 26 13:18:50 mydockerserver docker[852]: time="2016-02-26T13:18:50.596422393+01:00" level=error msg="Handler for POST /v1.22/containers/mycontainer/kill returned error: Cannot kill container mycontainer: No such container: mycontainer"
Feb 26 13:18:50 mydockerserver docker[852]: time="2016-02-26T13:18:50.619716473+01:00" level=error msg="Handler for DELETE /v1.22/containers/mycontainer returned error: No such container: mycontainer"
Feb 26 13:18:52 mydockerserver docker[852]: time="2016-02-26T13:18:52.827270606+01:00" level=error msg="Handler for POST /v1.22/containers/create returned error: Conflict. The name \"/mycontainer\" is already in use by container 872f92aa2d3ad1786888337202054b513111a21add8cbd0ad70018bb65337b7d. You have to remove (or rename) that container to be able to reuse that name."
Feb 26 13:18:52 mydockerserver docker[852]: time="2016-02-26T13:18:52.851244486+01:00" level=error msg="Handler for POST /v1.22/containers/mycontainer/kill returned error: Cannot kill container mycontainer: No such container: mycontainer"
Feb 26 13:18:52 mydockerserver docker[852]: time="2016-02-26T13:18:52.875650003+01:00" level=error msg="Handler for DELETE /v1.22/containers/mycontainer returned error: No such container: mycontainer"

Describe the results you expected:

Have my container up

Additional info:

On a crashed container, it occurs that sometimes the restart is not possible anymore, neither the deletion of the so called already existing container having this name.

margueritepd commented 8 years ago

I am experiencing the same issue. (Numbers indicate the exit status of the last command.)

0 $ docker-compose run --rm web bundle install
Creating volume "web_bower_components" with default driver
Creating volume "web_web_bundle" with default driver
Creating volume "web_node_modules" with default driver
Creating volume "web_bower_components" with default driver
Creating volume "web_web_bundle" with default driver
Creating volume "web_node_modules" with default driver
ERROR: Conflict. The name "/web_web_run_6" is already in use by container a1fe6c7b7e76d66f2061b75a56bfc10de6b9cad0c2d500441f64ed74b7f3bc79. You have to remove (or rename) that container to be able to reuse that name.

1 $ docker run -it  --rm --name web_web_run_6 ubuntu:14.04 /bin/bash
docker: Error response from daemon: Conflict. The name "/web_web_run_6" is already in use by container a1fe6c7b7e76d66f2061b75a56bfc10de6b9cad0c2d500441f64ed74b7f3bc79. You have to remove (or rename) that container to be able to reuse that name..
See 'docker run --help'.

1 $ docker ps -a | grep a1fe6

1 $ docker ps -a | grep web_web_run_6

1 $ docker rm web_web_run_6
Failed to remove container (web_web_run_6): Error response from daemon: No such container: web_web_run_6

1 $ docker rm /web_web_run_6
Failed to remove container (web_web_run_6): Error response from daemon: No such container: web_web_run_6

1 $ docker version
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.6
 Git commit:   c3959b1
 Built:        Tue Feb 23 21:12:32 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Thu Feb 11 20:39:58 2016
 OS/Arch:      linux/amd64

0 $ docker info
Containers: 5
 Running: 3
 Paused: 0
 Stopped: 2
Images: 104
Server Version: 1.10.1
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 205
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: bridge null host
Kernel Version: 4.1.17-boot2docker
Operating System: Boot2Docker 1.10.1 (TCL 6.4.1); master : b03e158 - Thu Feb 11 22:34:01 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.859 GiB
Name: default
ID: X2U3:ELQV:TVFG:YJDM:IE4N:JALI:FI6P:FJIT:AJUD:EDJF:3WBZ:XKRV
Debug mode (server): true
 File Descriptors: 36
 Goroutines: 65
 System Time: 2016-03-04T14:31:07.557652022Z
 EventsListeners: 0
 Init SHA1:
 Init Path: /usr/local/bin/docker
 Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox

0 $ docker-compose --version
docker-compose version 1.6.2, build unknown
Doooooo0o commented 8 years ago

Same bug on 1.10.2

thaJeztah commented 8 years ago

Looks similar to https://github.com/docker/docker/issues/15311

osterman commented 8 years ago

+1 - happens frequently on 1.10.2 under coreos

thaJeztah commented 8 years ago

@osterman are you using docker compose as well?

Doooooo0o commented 8 years ago

@thaJeztah in my case it's dockers started via docker run.

robvelor commented 8 years ago

I have this issue same issue on a docker swarm setup (with compose), restarting the docker daemon seems to solve the issue.

Doooooo0o commented 8 years ago

That's more a workaround than a fix tho

thaJeztah commented 1 year ago

Let me close this ticket for now, as it looks like it went stale.

Doooooo0o commented 1 year ago

indeed, it looks a bit stale :)