今天遇到一個神奇的現象,我對CentOS 8
系統作初始化以後再重啓系統,發現系統不能經過NetworkManager獲取DHCP IP了html
查了系統日誌發現是:java
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.2608] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191847.2614] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.2615] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.2718] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.2718] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.2721] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.3385] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.3387] dhcp4 (ens33): activation: beginning transaction (timeout in 45 seconds)
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191847.3387] device (ens33): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.3387] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191847.3392] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191847.3393] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9089] device (ens33): Activation: starting connection 'ens33' (e75e0548-afe3-4900-8233-74ba08573297)
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9090] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9092] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9093] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9094] device (ens33): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9144] device (ens33): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9146] device (ens33): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 30 04:24:22 DS-VM-Node172_17_0_1.cluster.com NetworkManager[949]: <info> [1588191862.9153] device (ens33): Activation: successful, device activated.
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.7576] device (ens33): state change: activated -> deactivating (reason 'user-requested', sys-iface-state: 'external')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.7745] device (ens33): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'external')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.7850] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.7851] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.7855] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8564] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8566] dhcp4 (ens33): activation: beginning transaction (timeout in 45 seconds)
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191883.8567] device (ens33): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8567] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191883.8574] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8575] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8673] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8674] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.8677] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9231] device (ens33): state change: config -> deactivating (reason 'new-activation', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9238] device (ens33): disconnecting for new activation request.
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9252] device (ens33): state change: deactivating -> disconnected (reason 'new-activation', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9352] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9359] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:43 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191883.9362] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0351] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0353] dhcp4 (ens33): activation: beginning transaction (timeout in 45 seconds)
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.0354] device (ens33): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0354] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.0360] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0362] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0448] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0449] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.0452] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1319] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1321] dhcp4 (ens33): activation: beginning transaction (timeout in 45 seconds)
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.1321] device (ens33): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1321] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.1327] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1328] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1383] device (ens33): Activation: starting connection 'ens33' (c96bc909-188e-ec64-3a96-6a90982b08ad)
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1383] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1386] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1975] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1978] dhcp4 (ens33): activation: beginning transaction (timeout in 45 seconds)
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.1978] device (ens33): failure to start DHCP: failed to set DHCP hostname: Invalid argument
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1978] device (ens33): state change: ip-config -> failed (reason 'dhcp-start-failed', sys-iface-state: 'managed')
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <warn> [1588191884.1985] device (ens33): Activation: failed for connection 'ens33'
Apr 30 04:24:44 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191884.1986] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7422] device (ens33): Activation: starting connection 'ens33' (882e1861-5548-4152-8eb1-04a186290097)
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7422] device (ens33): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7424] device (ens33): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7440] device (ens33): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7442] device (ens33): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7660] device (ens33): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7661] device (ens33): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 30 04:25:07 DS-VM-Node172_16_193_132.cluster.com NetworkManager[949]: <info> [1588191907.7669] device (ens33): Activation: successful, device activated.
經過谷歌搜索發現這是一個NetworkManager的BUGweb
BUG描述連接:https://bugzilla.redhat.com/show_bug.cgi?id=1744427
既然知道了是BUG,也就知道了問題緣由;在CentOS 8尚未對應更新NetworkManager軟件包的狀況下,咱們只能把系統的hostname修改成localhost,來避開這個BUG面試
for i in static pretty transient; do hostnamectl set-hostname localhost --$i; done
修改完成後就能夠重啓自動獲取DHCP IP了服務器
原文連接:https://www.dwhd.org/20200430_044321.html微信
往期精彩 網絡
◆ 必看 | Linux系列學習書籍免費送!app
◆ 利用expect批量修改Linux服務器密碼負載均衡
◆ LVM邏輯卷學習
好文和朋友一塊兒看~
本文分享自微信公衆號 - 開源Linux(qinlulu_123)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。