After installing docker on centos7,Failed to start docker."Job for docker.service failed."

17,150

this error usually occurs because of missing device-mapper-event-libs package.

# yum install device-mapper-event-libs
Share:
17,150
Songlin He
Author by

Songlin He

Updated on June 05, 2022

Comments

  • Songlin He
    Songlin He almost 2 years

    After executing yum install docker on centos7, I want to start docker by executing service docker start, then i can see the error:

    Redirecting to /bin/systemctl start docker.service Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.

    then I execute systemctl status docker.service -l, then the error is:

    docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
       Active: failed (Result: exit-code) since Sun 2015-03-15 03:49:49 EDT; 12min ago
         Docs: http://docs.docker.com
      Process: 11444 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS (code=exited, status=1/FAILURE)
     Main PID: 11444 (code=exited, status=1/FAILURE)
    Mar 15 03:49:48 localhost.localdomain docker[11444]: 2015/03/15 03:49:48 docker daemon: 1.3.2 39fa2fa/1.3.2; execdriver: native; graphdriver:
    Mar 15 03:49:48 localhost.localdomain docker[11444]: [a25f748b] +job serveapi(fd://)
    Mar 15 03:49:48 localhost.localdomain docker[11444]: [info] Listening for HTTP on fd ()
    Mar 15 03:49:48 localhost.localdomain docker[11444]: [a25f748b] +job init_networkdriver()
    Mar 15 03:49:48 localhost.localdomain docker[11444]: [a25f748b] -job init_networkdriver() = OK (0)
    Mar 15 03:49:49 localhost.localdomain docker[11444]: 2015/03/15 03:49:49 write /var/lib/docker/init/dockerinit-1.3.2: no space left on device
    Mar 15 03:49:49 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    Mar 15 03:49:49 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
    Mar 15 03:49:49 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
    

    I really have no idea, looking forward to your response, I will be very appreciative!

    • Ben Whaley
      Ben Whaley about 9 years
      The error no space left on device may indicate a full filesystem. Have you check how much disk space you have available to /var/lib/docker?
    • S Anand
      S Anand over 8 years
      This Github issue suggests that yum install docker-io-selinux would fix the problem if you have selinux enabled