基本的なことで申し訳ございません。初投稿です。需要なく間違っているかもしれませんが、ご容赦ください。
RHEL9 NetWorkManager-wait-online.Serviceがfailed
今回はオフラインインストールを行っていたが、NeNetWorkManager-wait-online.Serviceがfailedになってしまう。
調査してみたが、systemd-analyzeコマンドを使用し、起動時間に時間がかかっていることが分かった。
systemd-analyze
時間としては1m28sであった。そのため、failedしてしまうと予測した。
NetworkManager-wait-online.serviceのTimeout確認
ネットワークインターフェースの起動完了前のTimeoutを疑い、Timeoutを長くしてみようと思いたつ。
記述は以下のようになっていた。
ExecStart=/usr/bin/nm-online -s -q
Timeoutは特に設定されていない。ではどうするか?
override.confの作成
オフラインインストールであると、最小限しかインストールされていない。
そのため/etc/systemd/system/NetworkManager-wait-online.service.d/override.confを一から作成。
mkdir /etc/systemd/system/NetworkManager-wait-online.service.d
vi /etc/systemd/system/NetworkManager-wait-online.service.d/override.conf
override.confに以下の記述を追加。
[Service]
ExecStart=
ExecStart=/usr/bin/nm-online -s -q --timeout=200
保存後、デーモンの再起動を実行。
systemctl daemon-reload
systemctl restart NetworkManager-wait-online
その後、Status確認を行う。
systemctl status NetworkManager-wait-online
有効になっていることを確認後、nmcliコマンドでネットワーク設定を行った。
nmcli connection modify ens33 ipv4.addresses x.x.x.x/x
nmcli connection modify ens33 ipv4.gateway x.x.x.x
nmcli connection modify ens33 ipv4.dns "x.x.x.x x.x.x.x"
nmcli connection modify ens33 ipv4.method manual
nmcli connection up ens33
以上でネットワーク接続を終了。