Score:1

Will rsyslog recover from unavailable unix domain socket?

ng flag

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?

Score:1
jp flag

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.

Appleoddity avatar
ng flag
In practice, I was able to confirm this. But, I knew someone would come along and provide a technical surety. Thanks.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.