Re: Logs from a service is not showing up in journalctl but showing up in syslog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 25.07.19 14:20, Mantas Mikulėnas (grawity@xxxxxxxxx) wrote:

> Take a look at `journalctl -o verbose SYSLOG_IDENTIFIER=su _PID=38464`.
>
> I suspect the messages *are* in the journal, just not tagged with
> UNIT=kafka.service anymore. In some distros, `su` is actually configured to
> call pam_systemd and set up a new systemd-logind session – when this
> happens, the process is moved out of kafka.service into a user session
> scope, and its syslog messages are grouped accordingly.

It shouldn't just be "some distros" btw, it hopefully should be
all. Everything else would be a bug.

> Consider replacing `su` with `runuser`, or indeed with systemd's [Service]
> User= option.

"runuser" creates a PAM session too. "setpriv" is the command to use.

(Yes don't ask me why we have all three of su, runuser and setpriv
being different but also the same...)

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux