1

I am following the instructions for NXLog here: https://nxlog.co/documentation/nxlog-user-guide/linux-logs.html#linux_logs_forwarding_socket_example under 80.2 about forwarding syslog messages to NXLog.

It specifically states to restart NXLog and then rsyslog so that NXlog can create the socket before rsyslog tries to write to it.

My question is, during a reboot, and across different versions of Linux, it is ambiguous as to which service will start first, and my guess is that syslog may start first. What will happen if rsyslog starts before nxlog? Will rsyslog recover and start writing to the socket after nxlog starts and creates it?

Appleoddity
  • 3,290
  • 2
  • 10
  • 27

1 Answers1

1

A quick look at the source code shows that it tries to reopen the socket if it is invalid on each attempt to send a message.

AlexD
  • 8,179
  • 2
  • 28
  • 38
  • In practice, I was able to confirm this. But, I knew someone would come along and provide a technical surety. Thanks. – Appleoddity Jan 06 '22 at 21:47