请教docker engine启动失败,目前是图片中显示的状态

不要用 journalctl -xe。请用 journalctl -u docker.service -n 100。

你好,出来一些这个,不明白了啊

呃,重要信息被截断了……我是设置了 SYSTEMD_LESS=FRXMK 环境变量。不过你发出来给人看的话,重定向到文件就好了吧,何必截图呢。

多谢了,这个环境变量还没改,又运行了一下安装,
提示:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.

服务没有启动。

那麻烦问一下,如何启动呢,启动不了啊

看完整的日志。

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/load?quiet=1”: dial unix /var/run/docker.sock: connect: permission denied

你是 GPT 么,说着说着就忘了前文……

实在不好意思,不会啊,学习中

你是不会复制粘贴文本么,而且这一大堆红线,看着多难受啊……
你要装 iptables,或者禁用 docker 的 iptables 功能。

实在抱歉,重新拷贝一下:
GNU nano 7.2 dockerlogs.txt *
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735534627+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.content"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735551832+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.diff"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735569841+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.events"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735586466+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.healthcheck"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735602802+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.images"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735618487+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.leases"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735634757+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.namespaces"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735661609+08:00” level=info msg=“loading plugin "io.containerd.internal.v1.opt"…” type=io.containerd.internal.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735692579+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.snapshots"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735714979+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.tasks"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735731114+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.version"…” type=io.containerd.grpc.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735748062+08:00” level=info msg=“loading plugin "io.containerd.tracing.processor.v1.otlp"…” type=io.containerd.tracing.processor.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735767269+08:00” level=info msg=“skip loading plugin "io.containerd.tracing.processor.v1.otlp"…” error=“no OpenTelemetry endpoint: skip plugin” type=io.containerd.tracing.processor.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735782404+08:00” level=info msg=“loading plugin "io.containerd.internal.v1.tracing"…” type=io.containerd.internal.v1
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.735811474+08:00” level=error msg=“failed to initialize a tracing processor "otlp"” error=“no OpenTelemetry endpoint: skip plugin”
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.736051021+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd-debug.sock
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.736099735+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd.sock.ttrpc
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.736142556+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd.sock
7月 14 09:43:02 debian1250 dockerd[1640]: time=“2024-07-14T09:43:02.736160868+08:00” level=info msg=“containerd successfully booted in 0.020177s”
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.754376388+08:00” level=info msg=“[graphdriver] using prior storage driver: overlay2”
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.755734207+08:00” level=info msg=“Loading containers: start.”
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.761950405+08:00” level=warning msg=“failed to find iptables” error=“exec: "iptables": executable file not found in $PATH”
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.762626157+08:00” level=info msg=“stopping event stream following graceful shutdown” error=“” module=libcontainerd namespace=moby
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.763091490+08:00” level=info msg=“stopping healthcheck following graceful shutdown” module=libcontainerd
7月 14 09:43:02 debian1250 dockerd[1619]: time=“2024-07-14T09:43:02.763161983+08:00” level=info msg=“stopping event stream following graceful shutdown” error=“context canceled” module=libcontainerd namespace=plugins.moby
7月 14 09:43:03 debian1250 dockerd[1619]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
7月 14 09:43:03 debian1250 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
7月 14 09:43:03 debian1250 systemd[1]: docker.service: Failed with result ‘exit-code’.
7月 14 09:43:03 debian1250 systemd[1]: Failed to start docker.service - Docker Application Container Engine.
7月 14 09:43:04 debian1250 systemd[1]: docker.service: Scheduled restart job, restart counter is at 2.
7月 14 09:43:04 debian1250 systemd[1]: Stopped docker.service - Docker Application Container Engine.
7月 14 09:43:04 debian1250 systemd[1]: Starting docker.service - Docker Application Container Engine…
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.201951282+08:00” level=info msg=“Starting up”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.203277932+08:00” level=warning msg=“could not change group /var/run/docker.sock to docker: group docker not found”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.203688832+08:00” level=info msg=“libcontainerd: started new containerd process” pid=1704
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.217217030+08:00” level=info msg=“starting containerd” revision=2806fc1057397dbaeefbea0e4e17bddfbd388f38 version=v1.6.20
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.237644497+08:00” level=info msg=“loading plugin "io.containerd.content.v1.content"…” type=io.containerd.content.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.237722341+08:00” level=info msg=“loading plugin "io.containerd.snapshotter.v1.aufs"…” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241382607+08:00” level=info msg=“skip loading plugin "io.containerd.snapshotter.v1.aufs"…” error=“aufs is not supported (modprobe aufs failed: exit status 1 "modprobe: FATAL: Module aufs not found in directory /lib/modules/6.1.0-22-amd64\n"): skip plugin” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241509865+08:00” level=info msg=“loading plugin "io.containerd.snapshotter.v1.devmapper"…” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241539956+08:00” level=warning msg=“failed to load plugin io.containerd.snapshotter.v1.devmapper” error=“devmapper not configured”
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241558388+08:00” level=info msg=“loading plugin "io.containerd.snapshotter.v1.native"…” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241602062+08:00” level=info msg=“loading plugin "io.containerd.snapshotter.v1.overlayfs"…” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241759146+08:00” level=info msg=“loading plugin "io.containerd.snapshotter.v1.zfs"…” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.241973928+08:00” level=info msg=“skip loading plugin "io.containerd.snapshotter.v1.zfs"…” error=“path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin” type=io.containerd.snapshotter.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242005896+08:00” level=info msg=“loading plugin "io.containerd.metadata.v1.bolt"…” type=io.containerd.metadata.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242030150+08:00” level=warning msg=“could not use snapshotter devmapper in metadata plugin” error=“devmapper not configured”
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242049969+08:00” level=info msg=“metadata content store policy set” policy=shared
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242177148+08:00” level=info msg=“loading plugin "io.containerd.differ.v1.walking"…” type=io.containerd.differ.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242204071+08:00” level=info msg=“loading plugin "io.containerd.event.v1.exchange"…” type=io.containerd.event.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242224856+08:00” level=info msg=“loading plugin "io.containerd.gc.v1.scheduler"…” type=io.containerd.gc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242478993+08:00” level=info msg=“loading plugin "io.containerd.service.v1.introspection-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242509882+08:00” level=info msg=“loading plugin "io.containerd.service.v1.containers-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242535353+08:00” level=info msg=“loading plugin "io.containerd.service.v1.content-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242564099+08:00” level=info msg=“loading plugin "io.containerd.service.v1.diff-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242587537+08:00” level=info msg=“loading plugin "io.containerd.service.v1.images-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242619088+08:00” level=info msg=“loading plugin "io.containerd.service.v1.leases-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242640399+08:00” level=info msg=“loading plugin "io.containerd.service.v1.namespaces-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242663935+08:00” level=info msg=“loading plugin "io.containerd.service.v1.snapshots-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242684986+08:00” level=info msg=“loading plugin "io.containerd.runtime.v1.linux"…” type=io.containerd.runtime.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242739996+08:00” level=info msg=“loading plugin "io.containerd.runtime.v2.task"…” type=io.containerd.runtime.v2
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.242797839+08:00” level=info msg=“loading plugin "io.containerd.monitor.v1.cgroups"…” type=io.containerd.monitor.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243164904+08:00” level=info msg=“loading plugin "io.containerd.service.v1.tasks-service"…” type=io.containerd.service.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243200265+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.introspection"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243221586+08:00” level=info msg=“loading plugin "io.containerd.internal.v1.restart"…” type=io.containerd.internal.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243294023+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.containers"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243316663+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.content"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243337608+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.diff"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243370210+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.events"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243400595+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.healthcheck"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243420056+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.images"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243439293+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.leases"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243457989+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.namespaces"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243478129+08:00” level=info msg=“loading plugin "io.containerd.internal.v1.opt"…” type=io.containerd.internal.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243516350+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.snapshots"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243536669+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.tasks"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243556276+08:00” level=info msg=“loading plugin "io.containerd.grpc.v1.version"…” type=io.containerd.grpc.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243575210+08:00” level=info msg=“loading plugin "io.containerd.tracing.processor.v1.otlp"…” type=io.containerd.tracing.processor.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243600706+08:00” level=info msg=“skip loading plugin "io.containerd.tracing.processor.v1.otlp"…” error=“no OpenTelemetry endpoint: skip plugin” type=io.containerd.tracing.processor.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243619272+08:00” level=info msg=“loading plugin "io.containerd.internal.v1.tracing"…” type=io.containerd.internal.v1
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243651972+08:00” level=error msg=“failed to initialize a tracing processor "otlp"” error=“no OpenTelemetry endpoint: skip plugin”
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243931195+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd-debug.sock
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.243989319+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd.sock.ttrpc
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.244040008+08:00” level=info msg=serving… address=/var/run/docker/containerd/containerd.sock
7月 14 09:43:04 debian1250 dockerd[1704]: time=“2024-07-14T09:43:04.244070357+08:00” level=info msg=“containerd successfully booted in 0.027946s”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.263225244+08:00” level=info msg=“[graphdriver] using prior storage driver: overlay2”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.264402904+08:00” level=info msg=“Loading containers: start.”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.266947720+08:00” level=warning msg=“failed to find iptables” error=“exec: "iptables": executable file not found in $PATH”
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.267557747+08:00” level=info msg=“stopping event stream following graceful shutdown” error=“” module=libcontainerd namespace=moby
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.268314705+08:00” level=info msg=“stopping healthcheck following graceful shutdown” module=libcontainerd
7月 14 09:43:04 debian1250 dockerd[1685]: time=“2024-07-14T09:43:04.268374205+08:00” level=info msg=“stopping event stream following graceful shutdown” error=“context canceled” module=libcontainerd namespace=plugins.moby
7月 14 09:43:05 debian1250 dockerd[1685]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
7月 14 09:43:05 debian1250 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
7月 14 09:43:05 debian1250 systemd[1]: docker.service: Failed with result ‘exit-code’.
7月 14 09:43:05 debian1250 systemd[1]: Failed to start docker.service - Docker Application Container Engine.
7月 14 09:43:05 debian1250 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
7月 14 09:43:05 debian1250 systemd[1]: Stopped docker.service - Docker Application Container Engine.
7月 14 09:43:05 debian1250 systemd[1]: docker.service: Start request repeated too quickly.
7月 14 09:43:05 debian1250 systemd[1]: docker.service: Failed with result ‘exit-code’.
7月 14 09:43:05 debian1250 systemd[1]: Failed to start docker.service - Docker Application Container Engine.

您好,安装iptables后,运行了一下docker info
显示下面的内容:
Client:
Context: default
Debug Mode: false

Server:
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info”: dial unix /var/run/docker.sock: connect: permission denied
errors pretty printing info

这样的化docker是不是已经正常运行了吧,多谢多谢

sudo systemctl is-active docker.service

active

嗯,docker 的服务已经开始运行啦,但是你没有权限连上去。可能是有 docker 组之类的东西?我没在 Debian 上用过不清楚,你查一下文档。改了用户组之后记得重新登录。

多谢多谢