Como fazer o mecanismo do docker começar de novo?

1

Depois de uma reinicialização difícil, meu mecanismo de docker não inicia mais:

$ sudo service docker restart
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

Aqui está a chamada systemctl :

$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fr 2016-11-18 15:11:31 CET; 16s ago
     Docs: https://docs.docker.com
  Process: 4340 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 4340 (code=exited, status=1/FAILURE)

E aqui está o journalctl :

$ journalctl -xe
-- Unit docker.socket has begun starting up.
Nov 18 15:11:30 fluttershy systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Nov 18 15:11:30 fluttershy systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has begun starting up.
Nov 18 15:11:30 fluttershy dockerd[4340]: time="2016-11-18T15:11:30.765156842+01:00" level=info msg="libcontainerd: new containerd process, pid: 4349"
Nov 18 15:11:31 fluttershy audit[4361]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-default" pid=4361 comm="apparmor_p
Nov 18 15:11:31 fluttershy kernel: audit: type=1400 audit(1479478291.790:34): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-
Nov 18 15:11:31 fluttershy dockerd[4340]: time="2016-11-18T15:11:31.799138238+01:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
Nov 18 15:11:31 fluttershy dockerd[4340]: time="2016-11-18T15:11:31.908304680+01:00" level=fatal msg="Error starting daemon: layer does not exist"
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 15:11:31 fluttershy 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.
-- 
-- The result is failed.
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Unit entered failed state.
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 18 15:11:31 fluttershy sudo[4330]: pam_unix(sudo:session): session closed for user root

Não tenho ideia de como proceder e de como iniciar o Docker novamente.

    
por k0pernikus 18.11.2016 / 15:17

1 resposta

1

Como solução drástica, excluí o conteúdo do docker:

sudo rm /var/lib/docker/ -rf

Presumi que alguns dos meus arquivos de camada foram corrompidos durante a reinicialização por hardware, o que fez o docker iniciar falhar.

A linha que me apontou nessa direção foi:

msg="Error starting daemon: layer does not exist"

No entanto, tenha em mente que isso excluirá todas as suas imagens e todos os seus contêineres criados. Você terá que puxar e construí-los novamente, o que eu não me importo.

    
por k0pernikus 18.11.2016 / 15:29