Re: How to stop syslog-ng from generating HOSTID on start up
Dineth Jayasekera <[email protected]> Wed, 6 Sep 2023 06:53:22 -0400
| Newsgroups | gmane.comp.syslog-ng |
|---|---|
| Message-ID | <CACDDdQa+JOa9WA+MFEbMy9xCS6KU-98Ch05AuH0SyF_+bFubkQ@mail.gmail.com> |
Thanks Balazs for your help, Yes I was aware of the persist file, but I was having issues initializing it in the first place, and when upgrading to a new firmware load. I was not familiar with persist-tool it looks interesting. I only need to manually add the HOSTID, I did not have issues with the other fields in the persist file. I try creating the persist file with the HOSTID before starting up syslog-ng and see if that fixes the problem. Thanks! On Wed, Sep 6, 2023 at 12:28 AM Balazs Scheidler <[email protected]> wrote: > Syslog-ng saves this hostid in a persistent storage, so it should generate > it only once, ever. > > It is stored in the syslog-ng.persist file. Do you keep that across > restarts? Does this help your use case? > > Btw, it should also be possible to populate that persist file with this > entry before starting syslog-ng, maybe to a fixed value. Or the lower 4 > bytes of your Mac address, etc. persist-tool has a low level interface to > add such values while syslog-ng is not running > > On Wed, Sep 6, 2023, 03:44 Dineth Jayasekera <[email protected]> wrote: > >> Hi everyone, >> >> When starting up, I've noticed that syslog-ng hangs on our embedded >> system when generating the HOSTID. This is because the HOSTID generation >> uses RAND_bytes (in_create_host_id >> <https://github.com/syslog-ng/syslog-ng/blob/66123c955b29298ba6e68cdc77b9a0fdb4aded36/lib/host-id.c#L33>)- >> which needs entropy (which we don't have enough of, and don't want to >> generate). >> >> The logging is only used locally and there is no need for crypto >> functionality. Is there a way to avoid generating a cryptographically >> secure HOSTID on start up? >> >> Thank you! >> >> ______________________________________________________________________________ >> 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 > > ______________________________________________________________________________ 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