[syslog-ng] syslog-ng restarts due to interface not ready
Alexandre Santos
alexandre.rosas.santos at gmail.com
Tue Jul 21 10:18:05 UTC 2020
Thank you for your answer,
Unfortunately, this did not solve the problem, because the interface is
being created by an application on startup.
Do you know any way to check if the interface exists before trying to
connect using syslog-ng configurations?
Thanks,
Alex
On Fri, Jun 26, 2020 at 10:52 AM Nagy Gábor <gabor.hl at gmail.com> wrote:
> Hi,
>
> I think the syslog-ng service file needs to be updated so it will start
> after the network.service.
> We've had a bug report about this:
> https://github.com/syslog-ng/syslog-ng/issues/2667
>
> We fixed this in syslog-ng 3.25
> We added the "Wants" and "After" options (see
> https://github.com/syslog-ng/syslog-ng/pull/2994/files):
>
> [Unit]
> Description=System Logger Daemon
> Documentation=man:syslog-ng(8)
> Wants=network.target network-online.target
> After=network.target network-online.target
>
> Maybe I'm wrong, but at first glance I think this could fix your boot
> issue.
>
> Regards,
> Gabor
>
> Alexandre Santos <alexandre.rosas.santos at gmail.com> ezt írta (időpont:
> 2020. jún. 26., P, 11:33):
>
>> Hi,
>>
>> I have a configuration where one of my sources is a syslog source:
>>
>> syslog(ip(127.1.1.1) transport("udp") port(514) keep-alive(no));
>>
>>
>> But when the system starts up, the interface is not ready yet, and I get
>> the following errors:
>>
>>
>> Jun 26 09:17:50 localhost systemd[1]: Starting System Logger Daemon...
>> 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!;
>> 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
>> Jun 26 09:17:52 localhost syslog-ng[2301]: [2020-06-26T09:17:52.487867]
>> Error resolving hostname; host='127.1.1.1'
>> 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'
>> Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Main process
>> exited, code=exited, status=2/INVALIDARGUMENT
>> Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Failed with
>> result 'exit-code'.
>> Jun 26 09:17:52 localhost systemd[1]: Failed to start System Logger
>> Daemon.
>> Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Service
>> RestartSec=100ms expired, scheduling restart.
>> Jun 26 09:17:52 localhost systemd[1]: syslog-ng.service: Scheduled
>> restart job, restart counter is at 1.
>>
>>
>> When the systemd reaches the 5 attempts it disables the syslog-ng.service.
>>
>>
>> Do you know some way to fix this, by adding something, the syslog-ng
>> configuration?
>>
>>
>> Thanks in Advance,
>>
>> Alex
>>
>>
>> ______________________________________________________________________________
>> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
>> Documentation:
>> http://www.balabit.com/support/documentation/?product=syslog-ng
>> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>>
>>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20200721/ba3d7d54/attachment.html>
More information about the syslog-ng
mailing list