gpt4 book ai didi

python - Docker容器网络偶尔失败

转载 作者:太空宇宙 更新时间:2023-11-04 03:46:26 25 4
gpt4 key购买 nike

我使用了使用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.

如果有人能为我提供有关如何解决此问题的有用建议,我将非常感激。

最佳答案

可以通过 IP 地址 ping 通吗?

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

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

关于python - Docker容器网络偶尔失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28041195/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com