systemd_journal_no_entries问题解决

问题:

#journalctl

Journal file /var/log/journal/410/system@0.journal~ uses an unsupported feature, ignoring file.

-- No entries --

# systemctl --version

systemd 229

+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

原因:

新版本journal日志采用lz4算法替代xz,若要用journal查看日志需要重新编译systemd且使能lz4。

If the output contains `-LZ4`, journal entries will not be available.

若在Ubuntu下,可直接apt install systemd安装最新编译版本即可。

参考:

https://github.com/systemd/systemd/issues/3875

https://github.com/coreos/coreos-overlay/pull/2593

https://github.com/kinvolk/rkt/commit/9310333214c6e8a575a66f170e05c8509ddca6ae

posted @ 2019-05-24 20:13  yuxi_o  阅读(814)  评论(0编辑  收藏  举报