After deleting my /var/log/journal
by accident, I am unable to recover from the consequences. systemd-journald
keeps failing over and over again every time I try to start it. when I run:
$ journalctl --verify
PASS: /run/log/journal/system.journal
which doesn't bring me one step closer to solve it because /run/log/journal/system.journal
is created when I run /usr/lib/systemd/systemd-journald
directly, which on it self outputs
$ /usr/lib/systemd/systemd-journald
Failed to open runtime journal: Invalid argument
Things I have already tried:
- cleaning
/var/log/journal and
/run/log/journal`. - copying
/var/log/journal
from another machine to both paths, runningjournalctl --verify
to check them, and once again with--file
flag. - changing Storage setting in
/etc/systemd/journald.conf
toStorage=volatile
just to disable/var/log/journald
. - Rebooting.
After renaming the hostname, deleting & recreating
/etc/machine-id
by runningsystemd-machine-id-setup
and rebooting to apply these, systemd-journald came back to life!Try deleting
/var/log/journal
in case that there are any remainders from previous restoring attempts. Then setStorage=persistent
in/etc/systemd/journald.conf
and reboot.Normally systemd should recreate
/var/log/journal
during reboot.If this doesn't help try
Try:
systemctl stop systemd-journald && strace systemctl start systemd-journald
That should stream a lot of detail about what's going while the process is starting up. The final lines may provide a clue why it continues to fail.