<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Signature Manager Exchange Edition on 03:47:44 Saturday, 11 February 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72">
<br>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US">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:- <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US">Environment=LD_LIBRARY_PATH=/usr/java/jre1.8.0_112/lib/amd64/server<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US">Perhaps your python environment variables also need exporting to this file?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div></div>
</div>
<br>
<br>
<table class="ImprintUniqueIDTable" style="BORDER-COLLAPSE: collapse; WIDTH: 100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><font style="font-family:Calibri;font-size:10pt;color:#595959;font-weight:bold;">Damian</font> <font style="font-family:Calibri;font-size:10pt;color:#595959;font-weight:bold;">Bell</font><br>
<font style="font-family:Calibri;font-size:10pt;color:#595959;">Infrastructure Engineer</font><font style="font-family:Calibri;font-size:10pt;color:#595959;"> |
</font><font style="font-family:Calibri;font-size:10pt;color:#595959;">Support</font><font style="font-family:Calibri;font-size:10pt;color:#595959;"> |
</font><font style="font-family:Calibri;font-size:10pt;color:#595959;">H Clarkson & Co Ltd</font></td>
</tr>
<tr>
<td><br>
<font style="font-family:Calibri;font-size:10pt;color:#404040;">Email: </font><span style="font-family:Calibri;font-size:10pt;color:#0070C0;"><a href="mailto:Damian.Bell@clarksons.com" title="Click to send email to Damian Bell" target="" style="font-family:Calibri;font-size:10pt;color:#0070C0;"><span style="font-family:Calibri; font-size:10pt; color:#0070C0;">Damian.Bell@clarksons.com</span></a></span></td>
</tr>
</tbody>
</table>
<br>
<br>
<div class="WordSection1">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> syslog-ng [mailto:syslog-ng-bounces@lists.balabit.hu]
<b>On Behalf Of </b>Clayton Dukes<br>
<b>Sent:</b> 10 February 2017 21:32<br>
<b>To:</b> Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu><br>
<b>Subject:</b> [syslog-ng] Syslog-ng, centos7 and systemd seem to hate each other<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">…or at the very least, say bad things when the other is not looking :)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I did a bit of googling for this and found other people with similar issues, but could not find the fix.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">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).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">If I run syslog-ng -Fdve it works fine and sends everything to our python program destination<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">However, if I use the systemd script provided with syslog-ng, then I get nothing.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">If I tell sng to just log to a file (no filters, etc.), then it works.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">If I tell sng to just use the program dest (no filters, etc.) it does NOT work.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Rather confusing, but I can't see why the systemctl file is not working as it should.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Any ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Other references:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><a href="https://wiki.archlinux.org/index.php/syslog-ng">https://wiki.archlinux.org/index.php/syslog-ng</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><a href="https://bbs.archlinux.org/viewtopic.php?id=187057">https://bbs.archlinux.org/viewtopic.php?id=187057</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><a href="http://serverfault.com/questions/760383/syslog-ng-working-as-foreground-process-but-not-as-daemon">http://serverfault.com/questions/760383/syslog-ng-working-as-foreground-process-but-not-as-daemon</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Times New Roman",serif;color:#AFABAB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Clayton<o:p></o:p></span></p>
</div>
<p class="ImprintUniqueID"><font size="1"></p>
<hr>
</font><font face="Microsoft Sans Serif" size="1">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.<br>
<br>
</font><font face="Microsoft Sans Serif" size="1">Emails may be monitored.<br>
<br>
Details of Clarkson group companies and their regulators (where applicable) can be found at this url:
</font><a title="Disclosure" href="http://www.clarksons.com/disclosure/"><font face="Microsoft Sans Serif" size="1">Disclosure</font></a>
<hr>
<p></p>
</body>
</html>