[systemd-devel] Access journal log files within Docker Container using sd-journal API

Lennart Poettering lennart at poettering.net
Tue Mar 9 10:18:19 UTC 2021


On Di, 09.03.21 10:49, Sebastian Borchers (sebastian at desertbit.com) wrote:

> Hello,
>
> > Does "journalctl --file=…" work?
> You mean inside the container, right?
> I installed systemd in the container and tried the following command:
>
> journalctl --file /var/log/journal/<machine-id>/system.journal
>
> and it printed: *Failed to open files: Protocol not supported*

My guess is that your container runs a much older system version that
the host, in particular host might be 246 or newer, and container
might be older than that.

See NEWS file of systemd, we added a new compression and other stuff in
246. If these features are used in a file you need a client library
that supports them to access the features.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list