<div dir="ltr">Thanks Balazs for your help,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 6, 2023 at 12:28 AM Balazs Scheidler <<a href="mailto:bazsi77@gmail.com">bazsi77@gmail.com</a>> wrote:<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="auto">Syslog-ng saves this hostid in a persistent storage, so it should generate it only once, ever.<div dir="auto"><br></div><div dir="auto">It is stored in the syslog-ng.persist file. Do you keep that across restarts? Does this help your use case?</div><div dir="auto"><br></div><div dir="auto">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 </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 6, 2023, 03:44 Dineth Jayasekera <<a href="mailto:jayaseke@ualberta.ca" target="_blank">jayaseke@ualberta.ca</a>> wrote:<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">Hi everyone,<div><br></div><div>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<a href="https://github.com/syslog-ng/syslog-ng/blob/66123c955b29298ba6e68cdc77b9a0fdb4aded36/lib/host-id.c#L33" style="box-sizing:border-box;background-color:rgb(246,248,250);text-decoration-line:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px" rel="noreferrer" target="_blank">_create_host_id</a>)- which needs entropy (which we don't have enough of, and don't want to generate).</div><div><br></div><div>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?</div><div><br></div><div>Thank you!</div></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer 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 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 noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></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>