Hi,

I have some Debian servers that are configured to log both locally
and remotely, basically with:

*.* @@loghost:10514

at the end of a usual Debian /etc/rsyslog.conf file.

When rebooting or shutting down ("reboot" or "shutdown -h now") I
get as far as:

[  OK  ] Stopped target Network.
         Stopping Raise network interfaces...
[  OK  ] Stopped Raise network interfaces.

and then it hangs for 90 seconds on "Stopping System Logging
Service.", I can only assume because rsyslog was in the middle of
remotely logging something when the network interfaces were shut
down. After the 90 second systemd timeout, shutdown/reboot does
progress normally.

I tried overriding the rsyslog.service unit with:

[Unit]
After=networking.service

That works, in that it brings rsyslog.service up after the network
has started and stops it before stopping the network.

It's not quite ideal however because the *local* log files are then
missing entries from the entire time the network is down, which can
be quite significant. For example here is the final line before
shutdown and first line after next boot on a simple reboot:

2024-09-10T22:53:31.059980+00:00 hib systemd[1]: Stopped target Multi-User 
System.
2024-09-10T22:57:03.345006+00:00 hib systemd[1]: systemd-fsckd.service: 
Succeeded.

Are there any better ways to handle this that can preserve local
logging and not hold up the shutdown process?

Thanks,
Andy
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to