CentOS7 Docker Service failed to start solution
Check Step
Start the Docker service:
This time will be an error, please do the following steps:
1. Find the type of error, or the description of the error.
2. Check the Docker configuration file
3. Check disk space
4. Check Port occupancy
Detailed steps
Check the type of the error and view the log:
Check the configuration file, the different operating system location is basically the same:
or directly find Docker run the program, generally have the relevant configuration file default path
To check disk space:
Check Port occupancy:
Instance
The error message is as follows:
--Unit Docker.service has begun starting up.
Dec 21:17:46 localhost.localdomain docker[7175]: time= "2016-12-04t21:17:46.093155159+08:00" level=warning msg= "/!\ \ don ' T BIND on any IP addresses without setting-tlsverify IF you DON ' t KNOW WHAT for you ' RE doing/!\\ '
Dec 21:17:46 Lo Calhost.localdomain docker[7175]: time= "2016-12-04t21:17:46.093322868+08:00" Level=fatal msg= "Listen TCP 172.17.0.1:2376:bind:cannot assign requested Address "
Dec 21:17:46 localhost.localdomain systemd[1]: Docker.service:main Process exited, code=exited, status=1/failure
Dec 21:17:46 localhost.localdomain systemd[1] : Failed to start Docker application Container Engine.
--Subject:unit Docker.service has failed--
defined-by:systemd--support:http://lists.freedesktop.org/
Mailman/listinfo/systemd-devel----unit
Docker.service has failed.
Solution:
The previous article has said a simple brute-force solution is to clean up the/var/lib/docker directory and reset the settings.
However, the specific reasons are not clear. Today, the server has a power outage, the service is still an error. The point is that simple violence means not a good solution, but a palliative. Here is a new analysis of the first question:
You can see the fatal msg "Listen TCP 172.17.0.1:2376:bind:cannot Assign requested address", which says that a port is bound, but it cannot be allocated.
"If you do not understand, do not blind binding port", embarrassed.
Looking for a long time did not find in the/var/lib/docker directory about 2376 Port bind configuration, consider half-day, suddenly feel that the program started the configuration file, finally found in the/etc/sysconfig/docker directory. Well, this was previously bound to implement a Jenkins-related function, not a blind state. temporarily comment out this line of BIND settings and restart the service. ok~
Thank you for reading, I hope to help you, thank you for your support for this site!