Re: [systemd-devel] Issue with systemd / journalctl

2023-01-03 Thread Simon McVittie
On Tue, 27 Dec 2022 at 18:44:42 +0100, syst...@sioban.net wrote:
> I've discovered it's linked to selinux filesystem not mounted
> (don't ask me why, I'm still trying to dig into this...)

Debian does not use SELinux by default (the default LSM is AppArmor), so
if you are using SELinux, you're already in an unusual configuration that
might cause some weird things to happen.

Another thing to watch out for when using LSMs is that they often try hard
to avoid exposing information that could be useful to an attacker, which
might mean that the debug information available to you is incomplete.

On Mon, 26 Dec 2022 at 22:27:52 +, Barry wrote:
> > On 26 Dec 2022, at 14:02, syst...@sioban.net wrote:
> > I've re-installed systemd-sysv and rebooted, cleaned old journalctl entries 
> > but same issues.
> 
> Why do you need the sysv package on a systemd system at all?

It is correct to have systemd-sysv installed on any Debian-derived system
(Debian, Ubuntu, etc.) that will boot using systemd. That package means
"use systemd as init, replacing sysv-rc" because of some implementation
details of how Debian handled the switch from sysv-rc to systemd as its
default init system.

With hindsight, it would have been better if systemd-sysv had been named
systemd-as-init or something, or if it was named systemd and the current
systemd package (which has the actual executables) was instead named
systemd-bin - but renaming packages while maintaining backwards-compat is
really awkward, so we try not to.

The systemd-sysv package only contains a few symbolic links, so
reinstalling it is unlikely to help you much. If reinstalling anything
from the systemd source would have an effect, it would be systemd,
or possibly udev.

I agree that Debian support channels are likely to be a better place to
start for this sort of issue, since people in Debian will be more aware
of the finer points of how things were packaged in whatever Debian release
you're using. Please mention up-front that you are using SELinux, because
that's probably significant and will have an effect on what to try first.

smcv


Re: [systemd-devel] Issue with systemd / journalctl

2022-12-27 Thread systemd

Hi,

Thanks for your answer.
In the meanwhile I've discovered it's linked to selinux filesystem not 
mounted (don't ask me why, I'm still trying to dig into this...)


It solved most of the failed except the udev ones.

Le 26/12/2022 à 23:27, Barry a écrit :



On 26 Dec 2022, at 14:02,syst...@sioban.net  wrote:

  Hi,

I'm sorry if I'm at the wrong place but I feel I have a big issue with systemd 
and journalctl.
Basically I know no more journal logs since 24/10 and I have no real idea why.

I would ask on a debian mailing list. They will know the detail of how rsyslog 
service is packaged.

Its not systemd itself that is likely to be the source of the problem
It will most likely be the service unit files that you have installed that need 
debugging.



Here is the full story, if I'm at the wrong place, please tell me so.

I've discovered I have an issue with systemd on my Debian server. I've seen 
that some logging service don't want to start through systemd but the daemon 
itself start without issues:


❯ systemctl start rsyslog.service
A dependency job for rsyslog.service failed. See 'journalctl -xe' for details.

If I start manually rsyslogd, it's working:


❯ /usr/sbin/rsyslogd
❯ ps awx | grep rsyslog
   45995 ?Ssl0:00 /usr/sbin/rsyslogd

So I tried to understand what's wrong with systemd.

First,  journalctl -xe shows only lines from 24 Oct, nothing recent.

I've tried timedatectl to ensure the date is correct but got this message


❯ timedatectl
Failed to connect to bus: No such file or directory

I've searched a lot on Internet and ended up running systemctl --failed command 
and it shown many failed services:


❯ systemctl --failed
   UNITLOAD   ACTIVE SUBDESCRIPTION
● dbus.socket loaded failed failed D-Bus System Message Bus 
Socket
● syslog.socket   loaded failed failed Syslog Socket
● systemd-fsckd.socketloaded failed failed fsck to fsckd 
communication Socket
● systemd-journald-audit.socket   loaded failed failed Journal Audit Socket
● systemd-journald-dev-log.socket loaded failed failed Journal Socket (/dev/log)
● systemd-journald.socket loaded failed failed Journal Socket
● systemd-udevd-control.socketloaded failed failed udev Control Socket
● systemd-udevd-kernel.socket loaded failed failed udev Kernel Socket
● uuidd.socketloaded failed failed UUID daemon activation 
socket

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB= The low-level unit activation state, values depend on unit type.
9 loaded units listed.


I've re-installed systemd-sysv and rebooted, cleaned old journalctl entries but 
same issues.

Why do you need the sysv package on a systemd system at all?

Barry

Basically, I'm clueless here :/ If someone have an idea :D





Re: [systemd-devel] Issue with systemd / journalctl

2022-12-26 Thread Barry



> On 26 Dec 2022, at 14:02, syst...@sioban.net wrote:
> 
>   Hi,
> 
> I'm sorry if I'm at the wrong place but I feel I have a big issue with 
> systemd and journalctl.
> Basically I know no more journal logs since 24/10 and I have no real idea why.

I would ask on a debian mailing list. They will know the detail of how rsyslog 
service is packaged.

Its not systemd itself that is likely to be the source of the problem
It will most likely be the service unit files that you have installed that need 
debugging.


> 
> Here is the full story, if I'm at the wrong place, please tell me so.
> 
> I've discovered I have an issue with systemd on my Debian server. I've seen 
> that some logging service don't want to start through systemd but the daemon 
> itself start without issues:
> 
> > ❯ systemctl start rsyslog.service
> > A dependency job for rsyslog.service failed. See 'journalctl -xe' for 
> > details.
> 
> If I start manually rsyslogd, it's working:
> 
> > ❯ /usr/sbin/rsyslogd
> > ❯ ps awx | grep rsyslog
> >   45995 ?Ssl0:00 /usr/sbin/rsyslogd
> 
> So I tried to understand what's wrong with systemd.
> 
> First,  journalctl -xe shows only lines from 24 Oct, nothing recent.
> 
> I've tried timedatectl to ensure the date is correct but got this message
> 
> > ❯ timedatectl
> > Failed to connect to bus: No such file or directory
> 
> I've searched a lot on Internet and ended up running systemctl --failed 
> command and it shown many failed services:
> 
> > ❯ systemctl --failed
> >   UNITLOAD   ACTIVE SUBDESCRIPTION
> > ● dbus.socket loaded failed failed D-Bus System Message 
> > Bus Socket
> > ● syslog.socket   loaded failed failed Syslog Socket
> > ● systemd-fsckd.socketloaded failed failed fsck to fsckd 
> > communication Socket
> > ● systemd-journald-audit.socket   loaded failed failed Journal Audit Socket
> > ● systemd-journald-dev-log.socket loaded failed failed Journal Socket 
> > (/dev/log)
> > ● systemd-journald.socket loaded failed failed Journal Socket
> > ● systemd-udevd-control.socketloaded failed failed udev Control Socket
> > ● systemd-udevd-kernel.socket loaded failed failed udev Kernel Socket
> > ● uuidd.socketloaded failed failed UUID daemon 
> > activation socket
> > 
> > LOAD   = Reflects whether the unit definition was properly loaded.
> > ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
> > SUB= The low-level unit activation state, values depend on unit type.
> > 9 loaded units listed.
> 
> 
> I've re-installed systemd-sysv and rebooted, cleaned old journalctl entries 
> but same issues.

Why do you need the sysv package on a systemd system at all?

Barry
> 
> Basically, I'm clueless here :/ If someone have an idea :D
>