Docker Service Doesn't Start

As of last night, I’ve been unable to get the Rock-On / Docker service to start. From the web GUI, clicking on the ON/OFF switch results in, basically, nothing happening. No feedback or anything.

From bash, this is the most promising data I’ve seen so far:

[root@holocron docker]# systemctl status -l docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2016-06-23 12:41:26 CDT; 37s ago
 Docs: http://docs.docker.com
Process: 5970 ExecStart=/opt/rockstor/bin/docker-wrapper /mnt2/rockon_configs (code=exited, status=1/FAILURE)
Main PID: 5970 (code=exited, status=1/FAILURE)

Jun 23 12:41:26 holocron docker-wrapper[5970]: run_command([DOCKER, '-d', '-s', 'btrfs', '-g', mnt_pt])
Jun 23 12:41:26 holocron docker-wrapper[5970]: File "/opt/rockstor/src/rockstor/system/osi.py", line 98, in run_command
Jun 23 12:41:26 holocron docker-wrapper[5970]: raise CommandException(cmd, out, err, rc)
Jun 23 12:41:26 holocron docker-wrapper[5970]: system.exceptions.CommandException: Error running a command. cmd = ['/usr/bin/docker', '-d', '-s',
'btrfs', '-g', '/mnt2/rockon_configs']. rc = 1. stdout = ['']. stderr = ["Warning: '-d' is deprecated, it will be removed soon. See usage.", 'time="2016-06-23T12:41:26-05:00" level=warning msg="please use \'docker daemon\' instead." ', 'time="2016-06-23T12:41:26.488405406-05:00" level=info msg="API listen on /var/run/docker.sock" ', 'time="2016-06-23T12:41:26.497747549-05:00" level=info msg="Firewalld running: false" ', 'time="2016-06-23T12:41:26.514894295-05:00" level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints" ', '']
Jun 23 12:41:26 holocron systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 23 12:41:26 holocron systemd[1]: Unit docker.service entered failed state.
Jun 23 12:41:26 holocron systemd[1]: docker.service failed.
Jun 23 12:41:26 holocron systemd[1]: start request repeated too quickly for docker.service
Jun 23 12:41:26 holocron systemd[1]: Failed to start Docker Application Container Engine.
Jun 23 12:41:26 holocron systemd[1]: docker.service failed.
[root@holocron docker]# docker ps -a
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
[root@holocron docker]# 

The “juicy” part of the above seems to be, “Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints.”

I’ve seen two things online that people have reported work to fix this issue:

  1. rm -rf /var/lib/docker/network followed by a reboot
  2. Shutting down network interface docker0 then deleting it

Deleting the /var/lib/docker/network directory did nothing for me, and ‘ipconfig’ doesn’t show a docker0 network interface. I did, however, try to delete it but as expected it was futile.

Docker is at 1.9.1

[root@holocron var]# docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   a34a1d5
 Built:        Fri Nov 20 13:25:01 UTC 2015
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
1 Like

I was able to get the docker working again.

The first solution I posted, rm -rf /var/lib/docker/network, works for most people due to a database file within that directory being deleted. The database file name is local-kv.db. In my case, it didn’t work because there are two different files that needed to be deleted

./var/lib/docker/network/files/local-kv.db
./mnt2/main_pool/rockon_configs/network/files/local-kv.db

Removing both of these .db files simultaneously fixed my issue. To find all instances of local-kv.db, I ran this command:

find /. -name local-kv.db

Then, for each one found, I did “mv /path/filename /path/filename.orig”

I then rebooted and was able to start the docker. I suspect that I really only needed to eliminate the file under /mnt2/… and not /var/… because the one under /var wasn’t recreated. However, I think I tried that and it didn’t work. Doing both, however, did work.

The next problem is that now I can’t install any dockers… another time, another thread though.

3 Likes

Hey Henry,

Thanks, this fixed it for me, I did remove local-kv.db in /var/lib/docker/network/files/ as was suggested by many sources.
But indeed I also had one in my rockon pool too!

Thanks a bunch!

Cheers, Ray