我运行6000个docker容器没有问题。
但是当我启动 6056 时,docker
服务器变得不稳定(sudo
阻塞几分钟,但docker ps
可以工作)。
有大量可用内存:
$ free -m
total used free shared buff/cache available
Mem: 515961 490556 1892 424 23512 25130
Swap: 204799 2 204797
dmesg
沒有任何不正常的。
最后几行syslog
是:
Jan 28 23:28:00 r815 kernel: [ 4455.796352] eth0: renamed from vethf336446
Jan 28 23:28:00 r815 kernel: [ 4455.850727] IPv6: ADDRCONF(NETDEV_CHANGE): veth2ca7049: link becomes ready
Jan 28 23:28:01 r815 kernel: [ 4455.859853] br-bda462fa4b91: port 619(veth2ca7049) entered blocking state
Jan 28 23:28:01 r815 kernel: [ 4455.859859] br-bda462fa4b91: port 619(veth2ca7049) entered forwarding state
Jan 28 23:28:01 r815 systemd-networkd[2183]: veth2ca7049: Gained carrier
Jan 28 23:28:01 r815 CRON[1184672]: (root) CMD ( test -x /etc/cron.daily/popularity-contest && /etc/cron.daily/popularity-contest --crond)
Jan 28 23:28:01 r815 NetworkManager[2203]: <info> [1643408881.2471] device (veth2ca7049): carrier: link connected
Jan 28 23:28:01 r815 gnome-shell[3934]: Removing a network device that was not added
Jan 28 23:28:02 r815 avahi-daemon[2201]: Joining mDNS multicast group on interface veth2ca7049.IPv6 with address fe80::34e8:daff:febe:5a0d.
Jan 28 23:28:02 r815 systemd-networkd[2183]: veth2ca7049: Gained IPv6LL
Jan 28 23:28:02 r815 avahi-daemon[2201]: IPV6_ADD_MEMBERSHIP failed: Cannot allocate memory
Jan 28 23:28:02 r815 avahi-daemon[2201]: Registering new address record for fe80::34e8:daff:febe:5a0d on veth2ca7049.*.
Jan 28 23:28:03 r815 systemd-udevd[1159143]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 28 23:28:03 r815 systemd-udevd[1159142]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 28 23:28:03 r815 networkd-dispatcher[2212]: WARNING:Unknown index 12129 seen, reloading interface list
Jan 28 23:28:03 r815 systemd-udevd[1159143]: vethea6ca94: Could not generate persistent MAC: No data available
Jan 28 23:28:03 r815 kernel: [ 4458.069880] br-c4e757d4d5dc: port 619(vethea6ca94) entered blocking state
Jan 28 23:28:03 r815 kernel: [ 4458.069886] br-c4e757d4d5dc: port 619(vethea6ca94) entered disabled state
Jan 28 23:28:03 r815 systemd-udevd[1159142]: vethde3dc53: Could not generate persistent MAC: No data available
Jan 28 23:28:03 r815 kernel: [ 4458.076402] device vethea6ca94 entered promiscuous mode
Jan 28 23:28:03 r815 systemd-networkd[2183]: vethea6ca94: Link UP
Jan 28 23:28:03 r815 dockerd[3085]: time="2022-01-28T23:28:03.238338028+01:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
Jan 28 23:28:03 r815 dockerd[3085]: time="2022-01-28T23:28:03.238417716+01:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
Jan 28 23:28:03 r815 NetworkManager[2203]: <info> [1643408883.3082] manager: (vethde3dc53): new Veth device (/org/freedesktop/NetworkManager/Devices/8393)
Jan 28 23:28:03 r815 containerd[2340]: time="2022-01-28T23:28:03.311607393+01:00" level=info msg="starting signal loop" namespace=moby path=/run/containerd/io.containerd.runtime.v2.task/moby/25618e5ccedfd5ead996a269aa45b58b36de0cdaa47d2c9b6ee8baece96aa243 pid=1184729
Jan 28 23:28:03 r815 NetworkManager[2203]: <info> [1643408883.4258] manager: (vethea6ca94): new Veth device (/org/freedesktop/NetworkManager/Devices/8394)
感觉好像我达到了内核限制。
什么原因docker
造成堵塞?
答案1
这是你的问题
networkd-dispatcher[2212]: 警告:发现未知索引 12129,正在重新加载接口列表
msg="resolv.conf 中没有剩余非本地主机 DNS 名称服务器。使用默认外部服务器:[nameserver 8.8.8.8 nameserver 8.8.4.4]" 1 月 28 日 23:28:03 r815 dockerd[3085]: time="2022-01-28T23:28:03.238417716+01:00" level=info msg="已启用 IPv6;添加默认 IPv6 外部服务器:[nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
resolv.conf 通过 IPV4 连接打开 IPV6,因此所有数据都保持
您正在使用反向代理吗?
仍在努力修复它必须对 /ete/resolv.conf 进行修改