烏班圖18.04
我每天都會看到這種情況發生好幾次:
May 24 23:16:36 servername NetworkManager[936]: <info> [1621916196.7265] connectivity: (eno1) timed out
May 24 23:16:36 servername NetworkManager[936]: <info> [1621916196.7265] manager: NetworkManager state is now CONNECTED_SITE
May 24 23:16:36 servername dbus-daemon[894]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.10' (uid=0 pid=936 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
May 24 23:16:36 servername whoopsie[1685]: [23:16:36] offline
May 24 23:16:36 servername dbus-daemon[894]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 24 23:16:36 servername nm-dispatcher: req:1 'connectivity-change': new request (1 scripts)
May 24 23:16:36 servername nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
有時它看起來像這樣:
May 24 23:26:07 servername NetworkManager[936]: <info> [1621916767.8146] manager: NetworkManager state is now CONNECTED_GLOBAL
May 24 23:26:07 servername dbus-daemon[894]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.10' (uid=0 pid=936 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
May 24 23:26:07 servername whoopsie[1685]: [23:26:07] The default IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/2
May 24 23:26:07 servername whoopsie[1685]: [23:26:07] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/2
May 24 23:26:07 servername whoopsie[1685]: [23:26:07] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/2
May 24 23:26:07 servername dbus-daemon[894]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 24 23:26:07 servername nm-dispatcher: req:1 'connectivity-change': new request (1 scripts)
May 24 23:26:07 servername nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
May 24 23:26:08 servername whoopsie[1685]: [23:26:08] online
到底是怎麼回事?為什麼我的網卡 (eno1) 超時?
“connected_site”與“connected_global”?
“不是付費數據計劃”?哇啊?
答案1
“不是付費數據計劃”?哇啊?
這個很簡單:如果連線是付費數據計劃,您很快就會用完 Mbs。如果您告訴系統不要使用該連線(如果您為每個 Mb 付費),那麼 Whoopsie 將無法連線。
“connected_site”與“connected_global”?
有3種狀態:
state-connected-global
指示 NetworkManager 已連接到 Internet。state-connected-local
指示 NetworkManager 已連線至本機網路。state-connected-site
指示 NetworkManager 連接到 Internet 以外的網路。
為什麼我的網卡 (eno1) 超時?
這可能是很多事情:您的 ISP、您的路由器。 NIC 損壞或驅動程式不完全支援。但它也可能是另一個網絡獲取您的連接,然後與您的日誌匹配:這將是一個state-connected-site
.如果是這種情況,則值得調查:因此請仔細查看例如ip link show
何時發生這種情況。