[syslog-ng] startup and network sources

Evan Rempel erempel at uvic.ca
Wed Apr 17 21:48:37 UTC 2019


I've been looking at an interesting scenario on Redhat 7 (systemd) where syslog-ng fails to start because it can not resolve a network source name. This happens because the network has not started. Systemd attempts to restart syslog-ng a few times and then decides that  it is restarting syslog-ng too quickly and gives up on it.


2019-04-17T05:13:30.009 daemon.warning systemd[1]: start request repeated too quickly for syslog-ng.service
2019-04-17T05:13:30.010 daemon.err systemd[1]: Failed to start System Logger Daemon.
2019-04-17T05:13:30.010 daemon.notice systemd[1]: Unit syslog-ng.service entered failed state.
2019-04-17T05:13:30.010 daemon.warning systemd[1]: syslog-ng.service failed.


My first reaction was to add the "Wants=network-online.target" to the service definition to make syslog-ng start after the network has started, but that would mean that if I boot up without a network that syslog-ng would never start, and that seems incorrect to me.

Is there a way to to configure a network source to be optional and continue to retry binding to it after startup?

How do others handle this issue?

-- 
Evan



More information about the syslog-ng mailing list