Ubuntu 20.04を実行している新しいVPSで断続的なネットワークの問題が発生します。 10個のうち1個程度は、再起動後にネットワークが起動しません。
このような場合、サーバーは正常に起動するようですが、sshやhttpでは接続できません。また、メールログに次のエラーが表示されます。 「ホストまたはドメインが見つかりませんでした。name = gmail.com type = MXのネームサービスエラー:ホストが見つかりませんでした。もう一度やり直してください。」だから問題は、ネットワークが正しく起動しないようです。
ネットワークが起動するたびに報告されるシステムログには、ネットワーク関連のエラーがあります。ところで、ほとんどの場合、ネットワークに問題がなく、関連があるかどうかはわかりません。
サーバーはnetplan / networkdを使用します。これは /etc/netplan/01-eth0.yaml の出力です:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses:
- 66.175.209.4/24 # Your Linode's public IPv4 address.
- "2600:3c03::f03c:92ff:fe7c:62b6/128" # Primary IPv6 address.
- "2600:3c03:e001:730::/64" # Added by me for unique v6 IP
gateway4: 66.175.209.1 # Primary IPv4 gateway.
gateway6: "fe80::1" # Primary IPv6 gateway.
nameservers:
search: [members.linode.com] # Search domain.
addresses: [66.228.42.5,"2600:3c03::7",96.126.106.5,50.116.53.5] # DNS Server IP addresses.
出力は次のとおりですnetworkctl status
。最後の2行のエラーに注意してください。
● State: routable
Address: 66.175.209.4 on eth0
2600:3c03::f03c:92ff:fe7c:62b6 on eth0
2600:3c03:e001:730:: on eth0
fe80::f03c:92ff:fe7c:62b6 on eth0
Gateway: 66.175.209.1 (ICANN, IANA Department) on eth0
fe80::1 (Cisco Systems, Inc) on eth0
DNS: 66.228.42.5
96.126.106.5
50.116.53.5
2600:3c03::7
Search Domains: members.linode.com
Sep 11 03:59:01 eagle systemd-networkd[439]: Enumeration completed
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: IPv6 successfully enabled
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: Link UP
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: Gained carrier
Sep 11 03:59:01 eagle systemd[1]: Started Network Service.
Sep 11 03:59:01 eagle systemd[1]: Starting Wait for Network to be Configured...
Sep 11 03:59:03 eagle systemd-networkd[439]: eth0: Gained IPv6LL
Sep 11 03:59:03 eagle systemd[1]: Finished Wait for Network to be Configured.
Sep 11 03:59:04 eagle systemd-networkd[439]: eth0: Could not set NDisc route or address: Invalid argument
Sep 11 03:59:04 eagle systemd-networkd[439]: eth0: Failed
出力は次のとおりですnetworkctl
。
1 lo loopback carrier unmanaged
2 eth0 ether routable failed
2 links listed.
出力は次のとおりですip addr
。
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f2:3c:92:7c:62:b6 brd ff:ff:ff:ff:ff:ff
inet 66.175.209.4/24 brd 66.175.209.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2600:3c03:e001:730::/64 scope global
valid_lft forever preferred_lft forever
inet6 2600:3c03::f03c:92ff:fe7c:62b6/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::f03c:92ff:fe7c:62b6/64 scope link
valid_lft forever preferred_lft forever
systemd-networkdにデバッグを追加しました。関連出力は次のとおりです。
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Link state is up-to-date
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: found matching network '/run/systemd/network/10-netplan-eth0.network'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/disable_ipv6' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: IPv6 successfully enabled
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/proxy_ndp' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/use_tempaddr' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/accept_ra' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: LLDP: Started LLDP client
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Started LLDP.
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting address genmode for link
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-messa
ge=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Bus bus-api-network: changing state HELLO → RUNNING
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=429496
7295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus destination=:1.188 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 s
ignature=s error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus destination=:1.188 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=3 reply_cookie=0 s
ignature=s error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=4 reply_cookie=2 signature=u error-name=n/a error-messa
ge=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Successfully acquired requested service name.
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=5 reply_cookie=3 signature=n/a error-name=n/a error-mes
sage=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Match type='signal',sender='org.freedesktop.login1',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager',member='PrepareForSleep' successfully installed.
Sep 18 05:12:07 eagle systemd-networkd[203638]: lo: Link state is up-to-date
Sep 18 05:12:07 eagle systemd-networkd[203638]: lo: State changed: pending -> unmanaged
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_31 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=9 reply_
cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting address genmode done.
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Removing route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Discovering IPv6 routers
Sep 18 05:12:07 eagle systemd-networkd[203638]: NDISC: Started IPv6 Router Solicitation client
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: State changed: pending -> configuring
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=10 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting addresses
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Forgetting route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 66.175.209.4/24 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 2600:3c03::f03c:92ff:fe7c:62b6/128 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 2600:3c03:e001:730::/64 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Addresses set
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: 66.175.209.1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting routes
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Routes set
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: State changed: configuring -> configured
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=11 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Sent Router Solicitation, next solicitation in 4s
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Received Router Advertisement: flags none preference medium lifetime 60 sec
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Invoking callback for 'router' event.
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: fe80::2c09:59ff:fe49:329f, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Sep 18 05:12:08 eagle systemd-networkd[203638]: rtnl: received route message without ifindex, ignoring
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Could not set NDisc route or address: Invalid argument
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Failed
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: State changed: configured -> failed
Sep 18 05:12:08 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=12 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Stopping IPv6 Router Solicitation client
Sep 18 05:12:13 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.
Sep 18 05:12:14 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.
Sep 18 05:12:14 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.
失敗前の行は次のとおりです。rtnl: received route message without ifindex, ignoring
これが何を意味するのか/どのように解決するのかご存知ですか? ipv6アドレス"fe80::2c09:59ff:fe49:329f"への参照が見つかりません。これはipv6ゲートウェイ「fe80::1」に関連していますか?
.yamlファイルを変更してみましたが、これまでに報告されたエラーを防ぐことはできません。とにかく一般的にネットワークが現れるので、赤いニシンになることができます。
ネットワークが接続されていない場合は、内部コンソールからサーバーに接続できます。接続できない場合、上記の出力には違いはありません。
ネットワークの問題ではない場合、この断続的な問題を他のものとして説明できますか?
ベストアンサー1
追加してエラーを修正しました。
accept-ra: no
netplan.yaml
設定ファイルに。これにより、上記のエラーが発生していると思われるルーター広告が無効になります。