[syslog-ng] Syslog-ng, centos7 and systemd seem to hate each other

Damian Bell Damian.Bell at clarksons.com
Sat Feb 11 15:47:43 UTC 2017


I had a similar problem recently with the java environment variable with systemd and starting syslog-ng to output to elasticsearch, which required modification of the /usr/lib/systemd/system/syslog-ng.service file to contain the following:-

Environment=LD_LIBRARY_PATH=/usr/java/jre1.8.0_112/lib/amd64/server

Perhaps your python environment variables also need exporting to this file?




Damian Bell
Infrastructure Engineer | Support | H Clarkson & Co Ltd

Email: Damian.Bell at clarksons.com<mailto:Damian.Bell at clarksons.com>


From: syslog-ng [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Clayton Dukes
Sent: 10 February 2017 21:32
To: Syslog-ng users' and developers' mailing list <syslog-ng at lists.balabit.hu>
Subject: [syslog-ng] Syslog-ng, centos7 and systemd seem to hate each other

…or at the very least, say bad things when the other is not looking :)

I did a bit of googling for this and found other people with similar issues, but could not find the fix.
This is on a cos7.0 box (not 7.2) running syslog-ng v3.9 (user did have v3.5 but I tried upgrading him to resolve this).
If I run syslog-ng -Fdve it works fine and sends everything to our python program destination
However, if I use the systemd script provided with syslog-ng, then I get nothing.
If I tell sng to just log to a file (no filters, etc.), then it works.
If I tell sng to just use the program dest (no filters, etc.) it does NOT work.

If I do a 'systemctl stop syslog-ng' and then just simply type 'syslog-ng' (no foreground, debug, etc. switches) from the command line, it works fine.
Rather confusing, but I can't see why the systemctl file is not working as it should.
Any ideas?

Other references:
https://wiki.archlinux.org/index.php/syslog-ng
https://bbs.archlinux.org/viewtopic.php?id=187057
http://serverfault.com/questions/760383/syslog-ng-working-as-foreground-process-but-not-as-daemon




-Clayton

________________________________
This message is private and confidential. If you have received it in error, you are on notice of its status. Please notify us immediately by reply email and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence.

Emails may be monitored.

Details of Clarkson group companies and their regulators (where applicable) can be found at this url: Disclosure<http://www.clarksons.com/disclosure/>
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20170211/1a2fb15e/attachment-0001.html>


More information about the syslog-ng mailing list