Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access the logs of systemd 249 #59

Open
PaulAnnekov opened this issue Sep 4, 2023 · 1 comment
Open

Can't access the logs of systemd 249 #59

PaulAnnekov opened this issue Sep 4, 2023 · 1 comment

Comments

@PaulAnnekov
Copy link

I have a script which reads logs from journal in a loop: https://github.com/PaulAnnekov/log-trigger/blob/d7e55fb29584286d7cdb4170caad5c422bfda334/log_trigger.py#L189. It was working fine, until I was using ubuntu 18.04 (systemd 237). But when I upgraded to ubuntu 22.04 (systemd 249), it can't read the fresh logs generated after the upgrade.

I started to dig around and found that the problem is probably in pre-built wheels of the package. I was using them instead of building from sources. Looks like it was built on older version of the systemd library which just can't read the newer format of the logs. E.g. systemd 246 introduced the incompatible change:

systemd-journald gained support for zstd compression of large fields
in journal files. The hash tables in journal files have been hardened
against hash collisions. This is an incompatible change and means
that journal files created with new systemd versions are not readable
with old versions
. If the $SYSTEMD_JOURNAL_KEYED_HASH boolean
environment variable for systemd-journald.service is set to 0 this
new hardening functionality may be turned off, so that generated
journal files remain compatible with older journalctl
implementations.

I started to build the package from sources and it works. Probably, you need to upgrade the CI to build using newer version of the systemd.

@jasperjonker
Copy link

I can confirm this, it would be great to have a new release to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants