Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make systemd kill or stop respawning the rsyslog daemon

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?

like image 965
John Greene Avatar asked Jan 14 '18 20:01

John Greene


1 Answers

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.

like image 190
John Greene Avatar answered Oct 18 '22 11:10

John Greene