docker 和网络接口重命名

docker 和网络接口重命名

我使用 ubuntu 18.04。当我部署包含一个网络的 docker 堆栈时,系统突然开始在 syslog 中发出大量消息,并且连接变得不稳定(某些网页给出错误,指出网络连接确实发生了变化)。

一旦我删除 docker 堆栈,它就会停止重命名疯狂,一切又会恢复正常。有办法解决这种情况吗?

以下是其生成的日志消息示例:

May  2 02:48:09 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:09.389662516+02:00" level=error msg="Handler for GET /v1.39/distribution/hariseldon78/bmb-dashboard:latest/json returned error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
May  2 02:48:09 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:09.595125036+02: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]"
May  2 02:48:09 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:09.595140962+02:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.591717] br0: renamed from ov-001003-6c5zw
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9624]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.650836] vxlan0: renamed from vx-001003-6c5zw
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9624]: link_config: could not get ethtool features for vx-001003-6c5zw
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9624]: Could not set offload features of vx-001003-6c5zw: No such device
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9624]: Could not generate persistent MAC address for vx-001003-6c5zw: No such file or directory
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.682552] br0: port 1(vxlan0) entered blocking state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.682553] br0: port 1(vxlan0) entered disabled state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.682590] device vxlan0 entered promiscuous mode
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.682653] br0: port 1(vxlan0) entered blocking state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.682654] br0: port 1(vxlan0) entered forwarding state
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3134] devices added (path: /sys/devices/virtual/net/vx-001003-6c5zw, iface: vx-001003-6c5zw)
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3134] device added (path: /sys/devices/virtual/net/vx-001003-6c5zw, iface: vx-001003-6c5zw): no ifupdown configuration found.
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3160] devices removed (path: /sys/devices/virtual/net/vx-001003-6c5zw, iface: vx-001003-6c5zw)
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9651]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9651]: Could not generate persistent MAC address for veth90a19bf: No such file or directory
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9652]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:10 roby-Z170-Gaming-K3 systemd-udevd[9652]: Could not generate persistent MAC address for vethc3bd7b5: No such file or directory
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3614] manager: (veth90a19bf): new Veth device (/org/freedesktop/NetworkManager/Devices/9951)
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3622] manager: (vethc3bd7b5): new Veth device (/org/freedesktop/NetworkManager/Devices/9952)
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.736580] kauditd_printk_skb: 55 callbacks suppressed
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.736581] audit: type=1107 audit(1556758090.357:67652): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceAdded" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.736581]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.737985] audit: type=1107 audit(1556758090.357:67653): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceAdded" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.737985]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3670] devices added (path: /sys/devices/virtual/net/veth90a19bf, iface: veth90a19bf)
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3670] device added (path: /sys/devices/virtual/net/veth90a19bf, iface: veth90a19bf): no ifupdown configuration found.
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3671] devices added (path: /sys/devices/virtual/net/vethc3bd7b5, iface: vethc3bd7b5)
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.3671] device added (path: /sys/devices/virtual/net/vethc3bd7b5, iface: vethc3bd7b5): no ifupdown configuration found.
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.739551] audit: type=1107 audit(1556758090.361:67654): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.739551]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.766820] veth0: renamed from vethc3bd7b5
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.4244] devices removed (path: /sys/devices/virtual/net/vethc3bd7b5, iface: vethc3bd7b5)
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.798570] br0: port 2(veth0) entered blocking state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.798572] br0: port 2(veth0) entered disabled state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.798608] device veth0 entered promiscuous mode
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.798657] br0: port 2(veth0) entered blocking state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.798658] br0: port 2(veth0) entered forwarding state
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.799686] audit: type=1107 audit(1556758090.421:67655): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceRemoved" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.799686]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.801130] audit: type=1107 audit(1556758090.421:67656): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.802174] audit: type=1107 audit(1556758090.421:67657): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900303.802174]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.194828] eth0: renamed from veth90a19bf
May  2 02:48:10 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758090.8440] devices removed (path: /sys/devices/virtual/net/veth90a19bf, iface: veth90a19bf)
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.219124] audit: type=1107 audit(1556758090.841:67658): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceRemoved" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.219124]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.220086] audit: type=1107 audit(1556758090.841:67659): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.220086]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.220901] audit: type=1107 audit(1556758090.841:67660): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:10 roby-Z170-Gaming-K3 kernel: [900304.220901]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:11 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:11.165897704+02:00" level=error msg="Handler for GET /v1.39/distribution/hariseldon78/bmb-neo4j:latest/json returned error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.204655320+02:00" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.204676855+02:00" level=info msg="Ignoring extra error returned from registry: unauthorized: authentication required"
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.204698359+02:00" level=error msg="pulling image failed" error="pull access denied for hariseldon78/bmb-dashboard, repository does not exist or may require 'docker login'" module=node/agent/taskmanager node.id=ux0r15frrvy7nnom6uvmmh88y service.id=q5jlgyt9t35vv6vp0lceq773l task.id=y1w8w6pva46f7txtqa1lh0nex
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9733]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9733]: Could not generate persistent MAC address for vethd10f272: No such file or directory
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9736]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9736]: Could not generate persistent MAC address for vethf6d6f51: No such file or directory
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3400] manager: (vethd10f272): new Veth device (/org/freedesktop/NetworkManager/Devices/9953)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3411] manager: (vethf6d6f51): new Veth device (/org/freedesktop/NetworkManager/Devices/9954)
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.715708] audit: type=1107 audit(1556758092.337:67661): pid=1240 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceAdded" name=":1.12" mask="receive" pid=15586 label="snap.telegram-desktop.telegram-desktop" peer_pid=1295 peer_label="unconfined"
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.715708]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3459] devices added (path: /sys/devices/virtual/net/vethd10f272, iface: vethd10f272)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3460] device added (path: /sys/devices/virtual/net/vethd10f272, iface: vethd10f272): no ifupdown configuration found.
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3463] devices added (path: /sys/devices/virtual/net/vethf6d6f51, iface: vethf6d6f51)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.3463] device added (path: /sys/devices/virtual/net/vethf6d6f51, iface: vethf6d6f51): no ifupdown configuration found.
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.758820] veth1: renamed from vethf6d6f51
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4041] devices removed (path: /sys/devices/virtual/net/vethf6d6f51, iface: vethf6d6f51)
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9758]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9758]: Could not generate persistent MAC address for vetha4f05b2: No such file or directory
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9759]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May  2 02:48:12 roby-Z170-Gaming-K3 systemd-udevd[9759]: Could not generate persistent MAC address for vethd4d276a: No such file or directory
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4067] manager: (vetha4f05b2): new Veth device (/org/freedesktop/NetworkManager/Devices/9955)
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.778490] br0: port 3(veth1) entered blocking state
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.778492] br0: port 3(veth1) entered disabled state
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.778530] device veth1 entered promiscuous mode
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779697] docker_gwbridge: port 2(vethd4d276a) entered blocking state
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779699] docker_gwbridge: port 2(vethd4d276a) entered disabled state
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779897] device vethd4d276a entered promiscuous mode
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779974] IPv6: ADDRCONF(NETDEV_UP): vethd4d276a: link is not ready
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779976] docker_gwbridge: port 2(vethd4d276a) entered blocking state
May  2 02:48:12 roby-Z170-Gaming-K3 kernel: [900305.779977] docker_gwbridge: port 2(vethd4d276a) entered forwarding state
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4076] manager: (vethd4d276a): new Veth device (/org/freedesktop/NetworkManager/Devices/9956)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4120] devices added (path: /sys/devices/virtual/net/vetha4f05b2, iface: vetha4f05b2)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4120] device added (path: /sys/devices/virtual/net/vetha4f05b2, iface: vetha4f05b2): no ifupdown configuration found.
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4132] devices added (path: /sys/devices/virtual/net/vethd4d276a, iface: vethd4d276a)
May  2 02:48:12 roby-Z170-Gaming-K3 NetworkManager[1295]: <info>  [1556758092.4132] device added (path: /sys/devices/virtual/net/vethd4d276a, iface: vethd4d276a): no ifupdown configuration found.
May  2 02:48:12 roby-Z170-Gaming-K3 containerd[1542]: time="2019-05-02T02:48:12.431760881+02:00" level=info msg="shim containerd-shim started" address="/containerd-shim/moby/37d8ca23195fbc9a689baa292f73e221d31746b13bf7b6aacf90a5b7345e9053/shim.sock" debug=false pid=9793
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.689701433+02:00" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.689721504+02:00" level=info msg="Ignoring extra error returned from registry: unauthorized: authentication required"
May  2 02:48:12 roby-Z170-Gaming-K3 dockerd[1545]: time="2019-05-02T02:48:12.689745473+02:00" level=error msg="pulling image failed" error="pull access denied for hariseldon78/bmb-neo4j, repository does not exist or may require 'docker login'" module=node/agent/taskmanager node.id=ux0r15frrvy7nnom6uvmmh88y service.id=m74y7miq76ad7lqjttq8t4idl task.id=f2vgjae0urkkqr4kp410huzkb

答案1

同样的问题。在这里找到了一些可能相关的类似内容 ->https://github.com/docker/for-linux/issues/485

但是他们有一个定制的 systemd 设置,而我的机器上没有这种情况。我还没有在新的设置上测试过这个错误,所以我没有更多的见解。

我正在运行 Linux styx6 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

更新:在使用 docker run 时设置标志--network=host可以解决问题,但我从来没有在以前的系统上这样做过。

测试一下docker run --rm --network=host hello-world

此外,docker-compose当你开始一个容器...然而当你停止容器(例如您运行的终端中的 crtl c docker-compose up)中的错误再次出现在系统日志中。

相关内容