【问题标题】:Docker container network failed OccasionallyDocker容器网络偶尔失败
【发布时间】:2015-01-20 08:58:58
【问题描述】:

我使用了使用 logstash 的 docker 容器。 但是,有时容器网络会失败。

=> ping google.co.kr

cannot resolve google.co.kr : Unknown host.

此症状每隔一周出现一次,但有效。

容器 linux 版本

Linux 81ed1c4b8bc9 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

docker i/o 版本

Docker version 1.3.2, build 39fa2fa/1.3.2

写了附加信息,有几篇文章提到了iptables

[root@81ed1c4b8bc9 opt]# iptables -L
iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.

如果有人能给我关于如何解决这个问题的有用建议,我将不胜感激。

【问题讨论】:

  • 这让我想起了一些通过定期 ping/访问节点解决的问题,例如,您的主机可以每 5 分钟 ping/访问容器上的一个端口
  • 嗯...我认为这是错误的解决方案。还有什么?

标签: python linux docker


【解决方案1】:

你能通过 ip 地址 ping 通吗?

/etc/resolv.conf 的内容是什么?

如果是这样,请将 dns 选项添加到 docker 服务(例如 --dns 8.8.8.8 --dns 8.8.4.4)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-08
    • 2017-12-03
    • 2015-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-28
    • 1970-01-01
    相关资源
    最近更新 更多