在 OpenSUSE 中更新到 1.12.6-176.1 后无法启动 docker 服务:
Posted
技术标签:
【中文标题】在 OpenSUSE 中更新到 1.12.6-176.1 后无法启动 docker 服务:【英文标题】:Can't start docker service after updating to 1.12.6-176.1 in OpenSUSE: 【发布时间】:2017-02-02 22:24:06 【问题描述】:我在我的 OpenSUSE 13.2 中更新了 docker。 经过一些测试后,我看到 /etc/sysconfig/docker 中的 -H 标志导致 dockerd 无法启动,但我需要它来启用端口 2375 或 2376(因为它已经工作了几个月)。有了它,TSL 与否 TSL,所有或任何端口,docker 都不会启动。我尝试绑定到 0.0.0.0, localhost, ...
-- Logs begin at Tue 2016-10-25 12:48:00 CEST, end at Thu 2017-02-02 23:02:35 CET. --
Feb 02 23:01:35 ezequiel dockerd[22661]: time="2017-02-02T23:01:35.134216922+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 02 23:01:35 ezequiel dockerd[22661]: time="2017-02-02T23:01:35.247510727+01:00" level=info msg="Loading containers: done."
Feb 02 23:01:35 ezequiel dockerd[22661]: time="2017-02-02T23:01:35.247659069+01:00" level=info msg="Daemon has completed initialization"
Feb 02 23:01:35 ezequiel dockerd[22661]: time="2017-02-02T23:01:35.247709386+01:00" level=info msg="Docker daemon" commit=78d1802 graphdriver=btrfs version=1.12.6
Feb 02 23:01:35 ezequiel dockerd[22661]: time="2017-02-02T23:01:35.267370317+01:00" level=info msg="API listen on 192.168.100.1:2375"
Feb 02 23:02:35 ezequiel docker_service_helper.sh[22662]: Docker is dead
Feb 02 23:02:35 ezequiel systemd[1]: docker.service: control process exited, code=exited status=1
Feb 02 23:02:35 ezequiel dockerd[22661]: time="2017-02-02T23:02:35.810756005+01:00" level=info msg="Processing signal 'terminated'"
Feb 02 23:02:35 ezequiel 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.
Feb 02 23:02:35 ezequiel systemd[1]: Unit docker.service entered failed state.
如果我删除它,docker 会启动,但我无法从主机外部访问它(我曾经通过端口 2376 使用 TSL)
我直接试过dockerd,它绑定到tcp端口:
# /usr/bin/dockerd --containerd /run/containerd/containerd.sock --add-runtime oci=/usr/bin/docker-runc --label provider=generic -g /optLVM/varLibDocker -H tcp://127.0.0.1:2375
WARN[0000] [!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]
INFO[0000] [graphdriver] using prior storage driver "btrfs"
INFO[0000] Graph migration to content-addressability took 0.00 seconds
WARN[0000] Your kernel does not support swap memory limit.
WARN[0000] Your kernel does not support kernel memory limit.
WARN[0000] mountpoint for pids not found
INFO[0000] Loading containers: start.
.................INFO[0000] Firewalld running: false
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[0000] Loading containers: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=78d1802 graphdriver=btrfs version=1.12.6
INFO[0000] API listen on 127.0.0.1:2375
所以配置似乎发生了一些变化。
我的旧版本是: docker-1.12.1-152.3.x86_64
还有一个新的: docker-1.12.6-176.1.x86_64
感谢您的帮助...我确实需要 TCP(无论是否有 TSL)来远程访问 docker。
【问题讨论】:
【参考方案1】:更新后我遇到了同样的问题。 从 1.12.1 到 1.12.6,他们用“fd://”改变了一些东西。对我来说,它不再起作用了。我正在使用带有 tls 的 tcp。
在我的配置文件(/etc/docker/daemon.json)中
"tls" : true,
"tlsverify": true,
"tlscacert": "/etc/docker/ca.pem",
"tlscert" : "/etc/docker/server/server-cert.pem",
"tlskey" : "/etc/docker/server/server-key.pem",
"hosts" : ["unix:///var/run/docker.sock", "tcp://10.10.1.1:2376"]
我正在添加“主机”:unix:///var/run/docker.sock
我认为本地通信是通过 unix 套接字处理的,而远程连接通过 tcp 运行。
You can find the Infos here ...
【讨论】:
以上是关于在 OpenSUSE 中更新到 1.12.6-176.1 后无法启动 docker 服务:的主要内容,如果未能解决你的问题,请参考以下文章
Eclipse 在 opensuse 更新后崩溃并且没有错误日志