Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
syslog-ng.service startup failure on #2667
Version of syslog-ng
3.20 for RHEL 7
output of syslog-ng --version
Issue : Systemd startup errors
Whenever a RHEL/CentOS VM is booted up, syslog-ng daemon fails to start. This can be fixed by configuring syslog-ng.service to start after network daemon
Steps to reproduce
Install syslog-ng on CentOS 7
Modify /usr/lib/systemd/system/syslog-ng.service and add After=network.target to [Unit] section
The After=network.target method is also used by other daemons such as httpd (apache) and mariadb .
the rsyslog packaged by Redhat includes a little more in the Unit requirements
Since this is a superset of what MikeLim7 is asking for, I think this would be a little more complete for the systemd way of life.
It would also be more correct to use the systemd local configuration override method
Originally I had some fears that this change might affect some users negatively. But if the service file for rsyslog has these settings, it's most likely not problematic :)
You can test it yourself by using packages from https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng-githead/ If I receive positive feedback, I'll also add it to my 3.20 packages and discuss the changes for the official
Noted and thanks.
Guess can only test once I see a new el7 build at [https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng-githead/builds/]
Anyway, this is the full rsyslog.service for discussion (if needed)
Considering the "systemd way" and weighing backwards compatibility for migrating from Redhat 6 I think we can have the best of both worlds.
The current unofficial RPMs for Redhat 6 have the /etc/init.d/syslog-ng file defined with
with site specific overrides defined in the file /etc/sysconfig/syslog-ng
The systemd way of doing things is to define values in the service file
with site specific overrides in the file
Systemd also provides for using an environment configuration file for compatibility with the old way of overrides in
By doing both in the service file, we can support the "correct" systemd way AND be backwards compatible with the previous init.d files from Redhat 6 (System V init).
My recommended systemd service file is attached