<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Russel,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 by default, Syslog-ng spawns a supervising process and exists, which is detected by Systemd as a starting failure. Try adding the -F option to your ExecStart command.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 If it not helps: as you stated correctly, most of the Systemd problems are permission or environment problems. Try adding -devt to the ExecStart command to get a more verbose output from Syslog-ng.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best regards,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Laci</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of Russell Fulton <r.fulton@auckland.ac.nz><br>
<b>Sent:</b> Thursday, November 19, 2020 21:19<br>
<b>To:</b> syslog-ng@lists.balabit.hu <syslog-ng@lists.balabit.hu><br>
<b>Subject:</b> [syslog-ng] issues with starting syslog-ng from systemd</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.<br>
<br>
<br>
version 3.26.1  — ubuntu 14.04<br>
<br>
I can start syslog-ng from the command line without issues (apart form a warning to stderr) but when I try and start it from systemd it starts up (it prints the warning message to the logs) and then exits silently.<br>
<br>
This version was compiled locally i.e. it was not installed from a package. The .service file was adapted from a sample in the contrib directory. I also had the same behaviour from and other .service file that I put together myself.<br>
<br>
It is presumably some to do with the environment.<br>
<br>
I did try starting it with -i (interactive) in the hope that it would spit something out on the console but instead it hung and I had to ^C it<br>
<br>
Any thoughts on how to figure out what is going on?<br>
<br>
=====================================<br>
<br>
here are two different attempts (first commented)<br>
<br>
rful011@secmgrprd02:~$ cat /etc/systemd/system/syslog-ng.service<br>
#[Unit]<br>
#Description=syslog next generation<br>
#After=network.target auditd.service<br>
<br>
#[Service]<br>
#EnvironmentFile=/etc/default/syslog-ng<br>
#ExecStart=/usr/local/sbin/syslog-ng -f /usr/local/etc/syslog-ng.conf<br>
#ExecReload=/usr/local/sbin/syslog-ng-ctl reload<br>
#Restart=on-failure<br>
#RestartPreventExitStatus=255<br>
#Type=notify<br>
<br>
#[Install]<br>
#WantedBy=multi-user.target<br>
#Alias=syslog-ng.service<br>
<br>
<br>
[Unit]<br>
Description=System Logger Daemon<br>
Documentation=man:syslog-ng(8)<br>
Conflicts=emergency.service emergency.target<br>
Wants=network.target network-online.target<br>
After=network.target network-online.target<br>
<br>
[Service]<br>
Type=notify<br>
EnvironmentFile=-/etc/default/syslog-ng<br>
EnvironmentFile=-/etc/sysconfig/syslog-ng<br>
ExecStart=/usr/local/sbin/syslog-ng -f /usr/local/etc/syslog-ng.conf<br>
ExecReload=/usr/local/sbin/syslog-ng-ctl reload<br>
StandardOutput=journal<br>
StandardError=journal<br>
Restart=on-failure<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=dr1znNjgKtRp8R3YsDn1MfSTqCSx9Y%2FKp2XRtkIl5w0%3D&amp;reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=dr1znNjgKtRp8R3YsDn1MfSTqCSx9Y%2FKp2XRtkIl5w0%3D&amp;reserved=0</a><br>
Documentation: <a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=1aHuGKne5J%2FyTdvf7j2cpkZkKKbDkO%2B%2F2QoyTXXa1Sg%3D&amp;reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=1aHuGKne5J%2FyTdvf7j2cpkZkKKbDkO%2B%2F2QoyTXXa1Sg%3D&amp;reserved=0</a><br>
FAQ: <a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=aDkLqXsHant5U2dUB5u4IkISQ1u0BaDdG4ItXBZBk2U%3D&amp;reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&amp;data=04%7C01%7CLaszlo.Szemere%40oneidentity.com%7Ca91b88c842bd4a8a2d0608d88cc865bb%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637414139633183249%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=aDkLqXsHant5U2dUB5u4IkISQ1u0BaDdG4ItXBZBk2U%3D&amp;reserved=0</a><br>
<br>
</div>
</span></font></div>
</body>
</html>