CentOS7 Docker Service failed to start solution and implementation steps _docker

Source: Internet
Author: User
Tags bind docker run

CentOS7 Docker Service failed to start solution

Check Step

Start the Docker service:

Systemctl Restart Docker

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:

Journalctl-xe

Check the configuration file, the different operating system location is basically the same:

/etc/sysconfig/docker/

or directly find Docker run the program, generally have the relevant configuration file default path

To check disk space:

Df-h

Check Port occupancy:

Netstat-anp

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.