11

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?

John Greene
  • 2,239
  • 3
  • 26
  • 37

1 Answers1

30

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.

John Greene
  • 2,239
  • 3
  • 26
  • 37
  • 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. – aleivag Jan 16 '18 at 15:37
  • 1
    yeap you are right, the generic term is unit, but a unit can be also a lot more: https://www.freedesktop.org/software/systemd/man/systemd.unit.html – aleivag Jan 17 '18 at 00:31