I am trying to understand why
journalctl -b -1 sometimes returns the following error.
Data from the specified boot (-1) is not available: No such boot ID in journal
I noticed that, when it happens, the start job for the Journal Service and the stop job for flushing the journal to the persistent storage take more time than the usual. (Only in one case, they took about three minutes before completing or being interrupted.)
I decided to manually flush the journal, to see which error would be thrown.
sudo journalctl --flush doesn’t return any error.
sudo journalctl --sync returns this error, after a minute.
Failed to execute varlink call: Connection reset by peer
How can I fix this error?