AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 850876
Accepted
k0pernikus
k0pernikus
Asked: 2016-11-19 06:17:02 +0800 CST2016-11-19 06:17:02 +0800 CST 2016-11-19 06:17:02 +0800 CST

如何让docker引擎重新启动?

  • 772

硬重启后,我的 docker 引擎不再启动:

$ 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.

这是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)

这是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

我不知道如何继续以及如何让 docker 重新启动。

16.04
  • 1 1 个回答
  • 5381 Views

1 个回答

  • Voted
  1. Best Answer
    k0pernikus
    2016-11-19T06:29:11+08:002016-11-19T06:29:11+08:00

    作为一个相当激进的解决方案,我删除了 docker 的内容:

    sudo rm /var/lib/docker/ -rf
    

    我假设我的一些图层文件在硬重启期间损坏了,这导致 docker start 失败。

    将我指向那个方向的线是:

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

    但请记住,这将删除您的所有图像和所有构建的容器。您将不得不再次拉动并构建它们,我不介意。

    • 2

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve