systemd 日誌服務需要兩個小時才能啟動

systemd 日誌服務需要兩個小時才能啟動

我有一個相對較新的 debian 安裝,我在 /etc/hostname 中更改了主機名稱。它在啟動過程中向我提供以下訊息:

[ 7406.882872] systemd[1]: Starting Journal Service...
[ 7406.920156] systemd-journald[2733]: File /run/log/journal/bfd65934be53484d980ccc7304e5fb23/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 7497.066194] systemd[1]: systemd-journald.service: Start operation timed out. Terminating.
[ 7587.320229] systemd[1]: systemd-journald.service: State 'stop-final-sigterm' timed out. Killing.
[ 7677.573560] systemd[1]: systemd-journald.service: Processes still around after final SIGKILL. Entering failed mode.
[ 7677.586742] systemd[1]: Failed to start Journal Service.
[ 7677.593748] systemd[1]: systemd-journald.service: Unit entered failed state.
[ 7677.601384] systemd[1]: systemd-journald.service: Failed with result 'timeout'.
[ 7677.625405] systemd[1]: systemd-journald.service: Service has no hold-off time, scheduling restart.
[ 7677.635948] systemd[1]: Stopped Journal Service.

它一遍又一遍地執行此操作大約兩個小時,然後才最終確定:

[ 7948.405911] systemd[1]: Starting Journal Service...
[ 7948.443473] systemd-journald[2746]: File /run/log/journal/bfd65934be53484d980ccc7304e5fb23/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 7948.516285] systemd[1]: Started Journal Service.

當我透過 SSH 登入並運行時sudo systemctl enable systemd-journald.service,我得到以下資訊:

sudo: unable to resolve host [hostname redacted]
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

我對此的經驗很少systemd;是什麼原因造成的以及如何修復它以正常啟動?

相關內容