简体   繁体   English

Docker 容器未在 Swarm 集群中关闭

[英]Docker container not shutting down in Swarm cluster

On my docker swarm cluster, when I perform a docker stack deploy with a new version of my service's image or do a docker service update --force , the old containers of the service(s) get desired state SHUTDOWN, they remain with a current state running. On my docker swarm cluster, when I perform a docker stack deploy with a new version of my service's image or do a docker service update --force , the old containers of the service(s) get desired state SHUTDOWN, they remain with a current state 正在运行。

However, they don't seem te be actually running, I can't do anything with them, docker logs , docker inspect , docker exec , ... nothing.但是,它们似乎并没有真正运行,我对它们无能为力, docker logsdocker inspectdocker exec ,......什么都没有

The only way to get rid of them is to restart the docker daemon.摆脱它们的唯一方法是重新启动 docker 守护程序。

What would you consider look at to try to understand and fix this recurring issue?您会考虑看什么来尝试理解和解决这个反复出现的问题?

We faced the same issue a few days ago: Turned out, we had a logging-driver configured, but the logging-server was not available.几天前我们遇到了同样的问题:原来,我们配置了一个日志驱动程序,但是日志服务器不可用。 We stopped using this anyway, but forgot to remove the configuration from the service:我们仍然停止使用它,但忘记从服务中删除配置:

    logging:
      driver: fluentd
      options:
        fluentd-address: localhost:24224
        fluentd-async-connect: "true"

Removing this configuration fixed the issue for future containers.删除此配置解决了未来容器的问题。 Old instances were still hanging around, but restarting Docker helped.旧实例仍然存在,但重新启动 Docker 有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM