Bug 1778809 - journalctl cannot open journal
Summary: journalctl cannot open journal
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 31
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-02 14:39 UTC by Andreas Schöneck
Modified: 2020-08-01 13:53 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-08-01 13:53:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andreas Schöneck 2019-12-02 14:39:48 UTC
Description of problem:

journalctl cannot read system journal.


Version-Release number of selected component (if applicable):

243.4-1.fc31


How reproducible:

Easily, just run journalctl.


Steps to Reproduce:

1. run journalctl


Actual results:

Error message:

$ journalctl
Journal file /var/log/journal/ca0002d173ab497aba312acd6693956c/system uses an unsupported feature, ignoring file.
Use SYSTEMD_LOG_LEVEL=debug journalctl --file=/var/log/journal/ca0002d173ab497aba312acd6693956c/system to see the details.
-- No entries --

Running the suggested command yields:

$ SYSTEMD_LOG_LEVEL=debug journalctl --file=/var/log/journal/ca0002d173ab497aba312acd6693956c/system
Journal file /var/log/journal/ca0002d173ab497aba312acd6693956c/system uses incompatible flag lz4-compressed disabled at compilation time.
Failed to open journal file /var/log/journal/ca0002d173ab497aba312acd6693956c/system: Protocol not supported
mmap cache statistics: 0 hit, 1 miss
Failed to open files: Protocol not supported


Expected results:

System Journal is shown


Additional info:

$ journalctl --version
systemd 234
-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS -KMOD -IDN2 -IDN default-hierarchy=hybrid

$ dnf info systemd
Installed Packages
Name         : systemd
Version      : 243.4
Release      : 1.fc31
Architecture : x86_64
Size         : 12 M
Source       : systemd-243.4-1.fc31.src.rpm
Repository   : @System
From repo    : updates

Comment 1 Andreas Schöneck 2019-12-02 14:41:41 UTC
I cannot really deduct from anywhere why it is -LZ4 for journalctl, while systemd writes exactly that format. Any clue?

Comment 2 Zbigniew Jędrzejewski-Szmek 2020-08-01 13:53:44 UTC
Sorry for the slow reply.

The only explanation I see is that you're running a different journalctl binary. Did
you compile systemd for testing by any chance?

journalctl from systemd-243.4-1.fc31.x86_64.rpm that I downloaded now from koji says:
$ LD_LIBRARY_PATH=. ./journalctl --version
systemd 243 (v243.4-1.fc31)
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified

(Those strings are compiled into libsystemd-shared.so, they are not generated dynamically.
So if some package was missing or in a different version, the journalctl binary would
not start.)

This seems to be a local problem.


Note You need to log in before you can comment on or make changes to this bug.