Docker Community Forums

Share and learn in the Docker community.

Container won't start on reboot

Expected behavior

All containers specified with “restart: always” should be started after reboot.

Actual behavior

I have multiple docker-compose files. All nodes are specified with “restart: always”. After an automatic reboot (triggered by unattended-upgrades) no container is running anymore. Several hours later I logged in via SSH and run “docker stats”. After 20 sec every container were running again.

Additional Information

docker info
Containers: 7
 Running: 7
 Paused: 0
 Stopped: 0
Images: 5
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
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:
runc version: N/A
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 5.0.0-1016-azure
Operating System: Ubuntu 18.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.83GiB
Name: *****
ID: SWIS:LLYB:B6TW:JHDM:CSEY:OHRJ:4NJM:UQBB:D22D:6GDD:5HJQ:F7SG
Docker Root Dir: /var/lib/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

WARNING: No swap limit support
journal logs
-- Reboot --
Aug 23 05:56:59 WPServer2 systemd[1]: Starting Docker Application Container Engine...
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.810286987Z" level=info msg="systemd-resolved is running, so using resolvconf: /
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.843202990Z" level=info msg="parsed scheme: \"unix\"" module=grpc
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.843252389Z" level=info msg="scheme \"unix\" not registered, fallback to default
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.843898287Z" level=info msg="parsed scheme: \"unix\"" module=grpc
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.843917187Z" level=info msg="scheme \"unix\" not registered, fallback to default
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.844417486Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{u
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.844434486Z" level=info msg="ClientConn switching balancer to \"pick_first\"" mo
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.844495986Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.845216684Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.845368083Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{u
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.845380483Z" level=info msg="ClientConn switching balancer to \"pick_first\"" mo
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.845404783Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420
Aug 23 05:57:01 WPServer2 dockerd[19582]: time="2019-08-23T05:57:01.845709782Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420
Aug 23 05:57:02 WPServer2 dockerd[19582]: time="2019-08-23T05:57:02.254381971Z" level=info msg="[graphdriver] using prior storage driver: overlay2"
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.016281214Z" level=info msg="Graph migration to content-addressability took 0.00
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.017624610Z" level=warning msg="Your kernel does not support swap memory limit"
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.023058094Z" level=warning msg="Your kernel does not support cgroup rt period"
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.023107494Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.023127794Z" level=warning msg="Your kernel does not support cgroup blkio weight
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.023149394Z" level=warning msg="Your kernel does not support cgroup blkio weight
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.024340490Z" level=info msg="Loading containers: start."
Aug 23 05:57:03 WPServer2 dockerd[19582]: time="2019-08-23T05:57:03.862745030Z" level=info msg="Default bridge (docker0) is assigned with an IP add
Aug 23 05:57:10 WPServer2 dockerd[19582]: time="2019-08-23T05:57:10.113591282Z" level=info msg="Loading containers: done."
Aug 23 05:57:10 WPServer2 dockerd[19582]: time="2019-08-23T05:57:10.119994469Z" level=warning msg="failed to retrieve runc version: unknown output
Aug 23 05:57:12 WPServer2 dockerd[19582]: time="2019-08-23T05:57:12.704043988Z" level=warning msg="Not using native diff for overlay2, this may cau
Aug 23 05:57:12 WPServer2 dockerd[19582]: time="2019-08-23T05:57:12.704325387Z" level=info msg="Docker daemon" commit=2d0083d graphdriver(s)=overla
Aug 23 05:57:12 WPServer2 dockerd[19582]: time="2019-08-23T05:57:12.705793484Z" level=info msg="Daemon has completed initialization"
Aug 23 05:57:13 WPServer2 dockerd[19582]: time="2019-08-23T05:57:13.170083934Z" level=info msg="API listen on /var/run/docker.sock"
Aug 23 05:57:13 WPServer2 systemd[1]: Started Docker Application Container Engine.

I can not find any problems in the logs. Any ideas what I can do?