Description of problem: syslog-ng fails to start after a reboot Version-Release number of selected component (if applicable): syslog-ng-3.5.6-3 How reproducible: Always Steps to Reproduce: 1. Install syslog-ng and configure to log to remote syslog 2. Start, will work 3. Reboot host, syslog-ng fais to start 4. Manually start syslog through systemctl, works again Actual results: Feb 17 13:39:38 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:39:38 df-lin-jumphost systemd[1]: Starting Network Time Service... .... Feb 17 13:39:38 df-lin-jumphost systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 17 13:39:38 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:38 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:38 df-lin-jumphost systemd[1]: syslog-ng.service failed. Feb 17 13:39:38 df-lin-jumphost systemd[1]: syslog-ng.service holdoff time over, scheduling restart. Feb 17 13:39:38 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:39:38 df-lin-jumphost systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 17 13:39:38 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:38 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:38 df-lin-jumphost systemd[1]: syslog-ng.service failed. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service holdoff time over, scheduling restart. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 17 13:39:39 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service failed. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service holdoff time over, scheduling restart. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 17 13:39:39 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service failed. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service holdoff time over, scheduling restart. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 17 13:39:39 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service failed. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service holdoff time over, scheduling restart. Feb 17 13:39:39 df-lin-jumphost systemd[1]: start request repeated too quickly for syslog-ng.service Feb 17 13:39:39 df-lin-jumphost systemd[1]: Failed to start System Logger Daemon. Feb 17 13:39:39 df-lin-jumphost systemd[1]: Unit syslog-ng.service entered failed state. Feb 17 13:39:39 df-lin-jumphost systemd[1]: syslog-ng.service failed. Expected results: Feb 17 13:45:36 df-lin-jumphost systemd[1]: Starting System Logger Daemon... Feb 17 13:45:36 df-lin-jumphost systemd[1]: Started System Logger Daemon. Feb 17 13:45:56 df-lin-jumphost systemd[1]: Started System Logger Daemon. Additional info: Nothing else is logged anywhere. Playing with service startup order showed that adding a dependency to network.service and network.target in /usr/lib/systemd/system/syslog-ng.service resolves the issue, though that might not be the ideal solution.
I can confirm the same on CentOS 7 using EPEL-provided packages. One server is producing this issue, while another is not. The former is configured to receive logs from other hosts, the latter is configured to send them. Both are running CentOS 7 with the EPEL-provided packages. Both have journald configured to persistently save the journal, and syslog-ng configured to copy the syslog messages from the journal to /var/log/messages. This is explicitly configured this way to facilitate remote storage of system logs, as journald does not currently support that feature.
Created attachment 1222902 [details] Proposed patch Adds "After=network.target" to the service file