How to make systemd kill or stop respawning the rsyslog daemon
Asked Answered
D

1

14

It is great that systemd can keep rsyslog daemon alive even when it dies.

But I am crafting a new rsyslog configuration file and need to start this rsyslog daemon in debug mode. Before I debug rsyslogd, I need to stop the production rsyslog daemon, so I executed:

systemctl stop rsyslogd.service

But that command doesn't stop rsyslog daemon. Killing it via Unix signal doesn't keep systemd from respawning rsyslogd:

kill -KILL <rsyslogd-pid>

Even executing systemctl mask rsyslogd.service doesn't stop the respawning.

How do I make systemd STOP respawning 'rsyslog' daemon so I can troubleshoot it using debug?

Durward answered 14/1, 2018 at 20:40 Comment(0)
D
34

Well, after reading this bug report link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815862

This appears counter-intuitive...but the actual steps to perform is you have to stop TWO systemd units, and not just the rsyslog.service:

systemctl stop syslog.socket rsyslog.service

Problem solved.

Durward answered 14/1, 2018 at 20:47 Comment(2)
Just to clarify, the syslog.socket is not a service, is a socket file, Basically it allow systemd to start rsyslog on demand, only when a connection comes.Pub
yeap you are right, the generic term is unit, but a unit can be also a lot more: freedesktop.org/software/systemd/man/systemd.unit.htmlPub

© 2022 - 2024 — McMap. All rights reserved.