Docker do not run at start-up

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

Moderator: Lillian.W@AST

Post Reply
pawiks
Posts: 3
youtube meble na wymiar Warszawa
Joined: Fri Oct 16, 2020 7:57 pm

Docker do not run at start-up

Post by pawiks »

I have AS5304T and having this nagging issue where Docker do not run every time I re-boot/re-start/power-on. I have to stop and start in App Central manually and then it runs without problem.

Would appreciate if anyone could guide what is preventing Docker from running at start-up.
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Docker do not run at start-up

Post by Nazar78 »

How could you tell the daemon is not running when the NAS boots up? Or just probably the containers didn't start? Need more details here of what you've already checked. After the NAS startup, try "docker ps -a" or simply "docker info". In certain situation uninstalling then reinstalling could help.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
pawiks
Posts: 3
Joined: Fri Oct 16, 2020 7:57 pm

Re: Docker do not run at start-up

Post by pawiks »

I did exactly the "docker info" command to check if it is running or not. I can confirm that the daemon was not loaded.

I also uninstall and re-install docker several times with the same result. I can also run it only in the App Central with no way to run it from the command line.
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Docker do not run at start-up

Post by Nazar78 »

After reboot try /volume1/.@plugins/etc/init.d/S50docker-ce start

See any errors printed out.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
pawiks
Posts: 3
Joined: Fri Oct 16, 2020 7:57 pm

Re: Docker do not run at start-up

Post by pawiks »

Result is as shown below. Not good enough to pinpoint the problem

Starting Docker daemon...
rpcbind: another rpcbind is already running. Aborting
INFO[2020-10-18T11:28:53.186411747+08:00] Starting up
WARN[2020-10-18T11:28:53.188827694+08:00] could not change group /var/run/docker.sock to docker: group docker not found
INFO[2020-10-18T11:28:53.189815344+08:00] libcontainerd: started new containerd process pid=15195
INFO[2020-10-18T11:28:53.189888208+08:00] parsed scheme: "unix" module=grpc
INFO[2020-10-18T11:28:53.189912345+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-18T11:28:53.189950537+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-10-18T11:28:53.189980652+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-18T11:28:53.215338446+08:00] starting containerd revision=7ad184331fa3e55e52b890ea95e65ba581ae3429 version=v1.2.13
INFO[2020-10-18T11:28:53.215834803+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2020-10-18T11:28:53.215886406+08:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
WARN[2020-10-18T11:28:53.216145971+08:00] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /volume1/.@plugins/AppCentral/docker-ce/docker_lib/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
INFO[2020-10-18T11:28:53.216173659+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
WARN[2020-10-18T11:28:53.221074836+08:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="aufs is not supported"
INFO[2020-10-18T11:28:53.221107604+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2020-10-18T11:28:53.221165313+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2020-10-18T11:28:53.221303008+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-10-18T11:28:53.221599096+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-10-18T11:28:53.221621394+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2020-10-18T11:28:53.221652261+08:00] could not use snapshotter btrfs in metadata plugin error="path /volume1/.@plugins/AppCentral/docker-ce/docker_lib/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
WARN[2020-10-18T11:28:53.221674162+08:00] could not use snapshotter aufs in metadata plugin error="aufs is not supported"
WARN[2020-10-18T11:28:53.221694716+08:00] could not use snapshotter zfs in metadata plugin error="path /volume1/.@plugins/AppCentral/docker-ce/docker_lib/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
INFO[2020-10-18T11:28:53.221873541+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2020-10-18T11:28:53.221906248+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2020-10-18T11:28:53.221964198+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.221993885+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222020963+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222053219+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222101018+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222131451+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222162304+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.222187377+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2020-10-18T11:28:53.222306293+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2020-10-18T11:28:53.222395150+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2020-10-18T11:28:53.223059467+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2020-10-18T11:28:53.223111155+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2020-10-18T11:28:53.223188943+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223219485+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223248547+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223277253+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223306353+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223336894+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223365584+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223394067+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223422976+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2020-10-18T11:28:53.223485733+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223517003+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223553085+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223581901+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2020-10-18T11:28:53.223933513+08:00] serving... address="/var/run/docker/containerd/containerd-debug.sock"
INFO[2020-10-18T11:28:53.224020516+08:00] serving... address="/var/run/docker/containerd/containerd.sock"
INFO[2020-10-18T11:28:53.224044629+08:00] containerd successfully booted in 0.009553s
INFO[2020-10-18T11:28:53.234213934+08:00] parsed scheme: "unix" module=grpc
INFO[2020-10-18T11:28:53.234273187+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-18T11:28:53.234322658+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-10-18T11:28:53.234342631+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-18T11:28:53.235262725+08:00] parsed scheme: "unix" module=grpc
INFO[2020-10-18T11:28:53.235315704+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-18T11:28:53.235355084+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-10-18T11:28:53.235379976+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-18T11:28:53.429293132+08:00] [graphdriver] using prior storage driver: overlay2
INFO[2020-10-18T11:28:53.571095968+08:00] Loading containers: start.
WARN[2020-10-18T11:28:54.107983461+08:00] Running modprobe bridge br_netfilter failed with message: modprobe: invalid option -- 'a'
BusyBox v1.19.3 (2020-08-12 01:00:19 CST) multi-call binary.

Usage: modprobe [-qfwrsv] MODULE [symbol=value]...

-r Remove MODULE (stacks) or do autoclean
-q Quiet
-v Verbose
-f Force
-w Wait for unload
-s Report via syslog instead of stderr

, error: exit status 1
WARN[2020-10-18T11:28:54.108111367+08:00] Failed to find iptables: exec: "iptables": executable file not found in $PATH
INFO[2020-10-18T11:28:54.111190405+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2020-10-18T11:28:54.111743199+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2020-10-18T11:28:54.111747090+08:00] stopping healthcheck following graceful shutdown module=libcontainerd
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
mkdir: can't create directory '/sys/fs/cgroup/systemd': File exists
mount: mounting cgroup on /sys/fs/cgroup/systemd failed: Device or resource busy
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Docker do not run at start-up

Post by Nazar78 »

Your issue seems to be with iptables, do you have any issues with it? Try "which iptables" and "iptables -v". Let us see the result of "lsmod|grep iptable" (without "s"). Also check at the ADM portal, Settings, ADM Defender, check through all the settings see if there's any error popup and try reapply them.

Temporary solution is to load docker without iptables but I haven't tried this before although IIRC you will have no internet in your bridged network containers unless they're setup as host network instead which requires no NAT forwarding.

You can test, edit the /volume1/.@plugins/etc/init.d/S50docker-ce, append " --iptables=false" to the DOCKERD_OPT. Then reboot.

For further troubleshooting, more info/logs will be required like your NAS settings and what's installed so best is to open ticket with Asustor support of why the iptables failed which I suspected in this case. Or if you're familiar with iptables, you can try add remove them i.e. "iptables -t nat -L" to see the docker inserted rules.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
earthwalkerx
Posts: 36
Joined: Sat May 21, 2016 6:38 am

Re: Docker do not run at start-up

Post by earthwalkerx »

I have the same problem with docker-ce.

Code: Select all

controller instance: failed to create NAT chain DOCKER: Iptables not found
mkdir: can't create directory '/sys/fs/cgroup/systemd': File exists
mount: mounting cgroup on /sys/fs/cgroup/systemd failed: Device or resource busy
result 'which iptables':

Code: Select all

/usr/builtin/sbin/iptables
iptables -v doesn't work

I use an AS6102T
User avatar
Nazar78
Posts: 1984
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Docker do not run at start-up

Post by Nazar78 »

Code: Select all

root@Nimbustor4:~ # iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
6511K 3696M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
12996 2493K DOCKER-USER  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 DOCKER-ISOLATION-STAGE-1  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  docker0 docker0  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 777K packets, 330M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain DOCKER (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  !docker0 docker0  0.0.0.0/0            172.17.0.2           tcp dpt:9000

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DOCKER-ISOLATION-STAGE-2  all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-USER (1 references)
 pkts bytes target     prot opt in     out     source               destination
 2706  208K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0
I'm not sure why your iptables is missing. It should exists because ADM Defender Firewall is using it. You can try see if you can load the kernel modules below. Best to contact Asustor support for help since this is system related.

Code: Select all

root@Nimbustor4:~ # lsmod|grep iptable
iptable_filter         16384  1
iptable_nat            16384  1
nf_nat                 36864  3 xt_nat,iptable_nat,xt_MASQUERADE
ip_tables              28672  2 iptable_filter,iptable_nat

Code: Select all

root@Nimbustor4:~ # insmod /volume0/usr/builtin/lib/modules/ip_tables.ko
insmod: ERROR: could not insert module /volume0/usr/builtin/lib/modules/ip_tables.ko: File exists
As posted previously, you can try loading docker without iptables.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
earthwalkerx
Posts: 36
Joined: Sat May 21, 2016 6:38 am

Re: Docker do not run at start-up

Post by earthwalkerx »

I already try that. But can't access pihole via port 3001.
netstat -t show me that there is nothing on this port :-/

I will ask the asustor support.
dkobelak
Posts: 101
Joined: Wed Jun 08, 2016 2:21 am

Re: Docker do not run at start-up

Post by dkobelak »

same issue here.. quite often after server restart, docker does not come up.. i need to manually restart docker from app central and restart all apps that use docker.. sometimes i need to do it a couple of times before it works. would be nice if we could get a more current version of docker, maybe it would fix this problem.
AS-5104T running stock memory;RAID 5 - 4x3TB Toshiba DT01ACA300;BIOS: v1.21 - ADM: 4.0.4.RQO2
AS-6204T running stock memory;RAID 5 - 3x8TB Seagate Ironwolf ST8000VN0022;BIOS: v2.23 - ADM: 4.0.4.RQO2
Post Reply

Return to “Docker”