Syslog-ng: Writing to the user terminal has blocked for writing

Andybluejay

Dabbler
Joined
Jun 25, 2022
Messages
14
Hi, I am new to TrueNAS and have a relatively fresh install of TrueNAS-SCALE-22.02.2.1. Every 30min I get two copies of this message in the console:

Code:
Jul 25 14:11:16 truenas syslog-ng[13578]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
Jul 25 14:11:16 truenas syslog-ng[13578]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'


I do not know why I am seeing this and am having a difficult time googling it (and searching this forum). Any insight as to what this means, why I am seeing it, if I should ignore it, or how to make it stop would be greatly appreciated.
 

Pitts

Cadet
Joined
Nov 30, 2013
Messages
5
Hi, I am new to TrueNAS and have a relatively fresh install of TrueNAS-SCALE-22.02.2.1. Every 30min I get two copies of this message in the console:

Code:
Jul 25 14:11:16 truenas syslog-ng[13578]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
Jul 25 14:11:16 truenas syslog-ng[13578]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'


I do not know why I am seeing this and am having a difficult time googling it (and searching this forum). Any insight as to what this means, why I am seeing it, if I should ignore it, or how to make it stop would be greatly appreciated.
Ever figured it out ? I got this after a reinstall and upload config on new drives . Never seen this before

Code:
Oct 10 12:43:56 freenas syslog-ng[7162]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
Oct 10 12:43:56 freenas syslog-ng[7162]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
Oct 10 13:13:56 freenas syslog-ng[7162]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
Oct 10 13:13:56 freenas syslog-ng[7162]: Writing to the user terminal has blocked for writing, disabling for 10 minutes; user='root'
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Was this problem ever solved? I know it's from a year ago but someone I know has the same issue.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
A follow-on post from @jgreco :

With a UNIX tty, control-S or hardware RTS/CTS flow control would pause write output. A process such as syslog-ng must not block, and so it opens a TTY for nonblocking access, which means that when the kernel's rather small write buffer towards the device fills up, a writer will receive the UNIX error EWOULDBLOCK and will not write to the terminal, losing the contents of the write() request instead (this is slightly oversimplified as it is possible for a partial write to happen).

With a pty, a similar thing can happen if whatever is on the master side stops reading data that is written into the slave side; for example, if you use ssh(1) and suspend the connection with tilde-control-Z while ssh'd into your NAS. If messages are being written to the tty, this will eventually result in the pty buffers filling and you will get this error. I suspect there is also a way to cause this to happen using the webGUI's built-in shell function because I think I've seen it happen, but the cause there is a bit more ambiguous.

Those of us who would like to make sure that error logging is working correctly would probably argue that this "error" might be annoying but it is letting you know that some logging information that was supposed to be written to all tty's has not been so written. If you don't give a damn, then it is probably merely annoying. It should be able to suppress it with a proper syslog-ng configuration option, which I suspect doesn't exist in TrueNAS. Long way of saying "probably a bug" but I thought you might appreciate the deep dive from an old time TTY hacker and also syslog-ng guy. :smile:
 
Top