moby: upgrade docker-18.09.2-ce , shim.sock: bind: address already in use: unknown
Description
Steps to reproduce the issue: 1.upgrade docker from 18.03.1-ce to 18.09.2-ce
-
some container show failed to bind address I have “ps -ef|grep mysqld” and ss -nlp|grep 3306 ,cleaned process
-
docker start xxxx , it still show the some error
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Version: 18.09.2
API version: 1.39
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:13:27 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 03:47:25 2019
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 22
Running: 20
Paused: 0
Stopped: 2
Images: 41
Server Version: 18.09.2
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.4.152-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.67GiB
Name: dev-rac-agent-01
ID: FNDH:GCFF:P7GX:7SU3:F3JY:2NSS:DSGX:7WOT:HDA4:TQDC:LT5T:SPDF
Docker Root Dir: /data/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Additional environment details (AWS, VirtualBox, physical, etc.): CentOS Linux release 7.5.1804 (Core) on xen
anyone has this issue ?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 17 (2 by maintainers)
in my case this work for me:
sudo apt update && sudo apt upgrade -y && sudo shutdown -r nowafter host has restarted - all containers is UP without re-creations and downgrade.The solution described by @suutari worked for me. Downgrade to the version suggested by @Max95Cohen. Remember to kill every process with “container” in the name before downgrade:
It’s important to restart all the containers with the downgraded version of docker.io before stopping them.
Hi, there. My system is Ubuntu 18.04.
I do this:
sudo apt-cache policy docker.ioOutput:
sudo apt install docker.io=18.06.1-0ubuntu1.2~18.04.1sudo apt autoremoveThen restart my docker container. This is work to me.
This happened to me too on Ubuntu 18.04 when upgrading Docker from
18.06.1-0ubuntu1.2~18.04.1to18.09.5-0ubuntu1~18.04.2. I was able to start the failing containers with following steps:ps auxfoutput, maybe simply rebooting might help.)systemctl restart docker.servicedocker start CONTAINER_ID. Had to do this twice though, since for some reason the first start returnedError response from daemon: id already in useerror, but the second try succeeded.docker stop CONTAINER_IDdocker start CONTAINER_IDI experience a similar issue on version 18.09.3
Deleting the container and recreating seems to resolve the issue
Same trouble after upgrading from 18.06. Same containers started successfully, other don’t. Ubuntu 18.04 on baremetal edited: after removing old containers by ‘docker rm’ new is starting successfully
You can avoid the reboot
Find the ID of your failed container
find the PID of your failed container
kill the PID of the failed container
[root@ns7dev9 ~]# kill -9 32627start the container
[root@ns7dev9 ~]# docker start 005ac6424215 005ac6424215After a 18.06 -> 19.02 upgrade on RHEL 7 using the upstream
docker-cepackages, containers fail to (re)start until they are removed/pruned:After re-creating all of the containers, confirm that there are a bunch of old
docker-containerd-shimprocesses left hanging around with the old container IDs:I assume this is related to the new
containerd.iosplit in the 18.09 packaging.Looking at
systemctl status, these olddocker-containerd-shimprocesses are under the systemddocker.servicecgroup, and the newcontainerd-shimprocesses are under the newcontainerd.servicecgroup:I’m guessing that due to
KillMode=process, asystemctl stop/restart dockerwill leave those olddocker-containerd-shimprocesses running, and a reboot is indeed the easiest way to get these cleaned up?Same issue after upgrading to version 18.09.5 on a Ubuntu 18.04
All my running containers at the time of update (4 of them) were affected and needed to be recreated. My stopped containers (2 of them) on the other hand were not affected and I could still start them up normally after the update