<div dir="ltr"><div><div>Hi,<br><br></div>I think the syslog-ng service file needs to be updated so it will start after the network.service.<br></div>We've had a bug report about this: <a href="https://github.com/syslog-ng/syslog-ng/issues/2667">https://github.com/syslog-ng/syslog-ng/issues/2667</a><br><div><br></div><div>We fixed this in syslog-ng 3.25<br></div><div>We added the "Wants" and "After" options (see <a href="https://github.com/syslog-ng/syslog-ng/pull/2994/files">https://github.com/syslog-ng/syslog-ng/pull/2994/files</a>):<br><br>[Unit]<br>Description=System Logger Daemon<br>Documentation=man:syslog-ng(8)<br>Wants=network.target network-online.target<br>After=network.target network-online.target<br><br></div><div>Maybe I'm wrong, but at first glance I think this could fix your boot issue.<br></div><div><br></div><div>Regards,<br></div><div>Gabor<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Alexandre Santos <<a href="mailto:alexandre.rosas.santos@gmail.com">alexandre.rosas.santos@gmail.com</a>> ezt írta (időpont: 2020. jún. 26., P, 11:33):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">


















<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:arial,sans-serif">Hi,</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:arial,sans-serif">I have a configuration where one of my sources is a syslog source:</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:arial,sans-serif">syslog(ip(127.1.1.1) transport("udp") port(514) keep-alive(no));</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:arial,sans-serif"><br></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif">But when the system starts up, the interface is not ready yet, and I get the following errors</span></font><span style="font-family:arial,sans-serif"><font size="2">:</font><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><span style="font-family:arial,sans-serif"><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:monospace">Jun 26 09:17:50 localhost systemd[1]: Starting System Logger Daemon...<br>Jun 26 09:17:52 localhost syslog-ng[2301]: [2020-06-26T09:17:52.485148] WARNING: With use-dns(no), dns-cache() will be forced to 'no' too!;<br>Jun 26 09:17:52 localhost syslog-ng[2301]: [2020-06-26T09:17:52.487159] Current position not matches to the saved cursor position, seek to head; cursor='s=f62c0e80f50948deb29cf2d28230a<br>Jun 26 09:17:52 localhost syslog-ng[2301]: [2020-06-26T09:17:52.487867] Error resolving hostname; host='127.1.1.1'<br>Jun 26 09:17:52 localhost syslog-ng[2301]: [2020-06-26T09:17:52.487878] Error initializing message pipeline; plugin_name='syslog', location='/etc/syslog-ng/syslog-ng.conf:43:5'<br>Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Main process exited, code=exited, status=2/INVALIDARGUMENT<br>Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Failed with result 'exit-code'.<br>Jun 26 09:17:52 localhost systemd[1]: Failed to start System Logger Daemon.<br>Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Service RestartSec=100ms expired, scheduling restart.<br>Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Scheduled restart job, restart counter is at 1.</span></font></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt"><font size="2"><span style="font-family:arial,sans-serif"></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif"><br></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif">When the systemd reaches the 5 attempts it disables the syslog-ng.service.</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif"><br></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif">Do you know some way to fix this, by adding something, the syslog-ng configuration?</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif"><br></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif">Thanks in Advance,</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt"><font size="2"><span style="font-family:arial,sans-serif">Alex<br></span></font></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><i><span style="font-size:10pt;color:rgb(197,90,17)"><span></span></span></i></p>





</div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>