Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

freenas ctld: read: connection lost

x0n

Joined
Nov 13, 2018
Messages
3
@bodriye You're in luck. I just so happened to conduct an epic SCSI debugging session in FreeNAS and I'm also virtualizing it on Proxmox. The console messages are ****ing annoying, so I adapted @EsJ's script.

Patch attached.
 

Attachments

x0n

Joined
Nov 13, 2018
Messages
3
@bodriye do you happen to know how to make this permanent in current FreeNAS versions? I modified /conf/base/etc/local/syslog-ng.conf but after a reboot, /etc/local/syslog-ng.conf reverts to a clean version m(
 

KenwoodFox

Newbie
Joined
Nov 6, 2018
Messages
34
Hi there,

the feature is the check, if the storage is still alive. And multipe targets are leading to multiple log entries every 10 seconds.

Suppress the unwanted connection lost entries with the following. It's a workaround but better than disabling the complete syslog and works for me until next FreeNAS reboot with FreeNAS 9.10 and Proxmox 4.4. iSCSI is communicating over a separate vlan.
Unfortunately I haven't found the source where syslog-ng.conf is being renewed after every reboot. Perhaps someone from ixsystems can help.
Code:
Feb  2 22:53:02 freenas ctld[56870]: 192.168.160.10: read: connection lost
Feb  2 22:53:02 freenas ctld[1715]: child process 56870 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56871]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56871 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56872]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56872 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56873]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56873 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56874]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56874 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56875]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56875 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56876]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56876 terminated with exit status 1
Feb  2 22:53:03 freenas ctld[56877]: 192.168.160.10: read: connection lost
Feb  2 22:53:03 freenas ctld[1715]: child process 56877 terminated with exit status 1

/etc/local/syslog-ng.conf
Code:
# Needs freeNAS with syslog-ng (since freeNAS 9.3)
# The following filter cuts unwanted syslog-ng entries caused by an iSCSI connection to freeNAS, which appear every 10 seconds.
# Anyway, iSCSI connection is working correctly in my case.
#
# ==> messages <==
# Feb  2 22:53:02 freenas ctld[56870]: 192.168.160.10: read: connection lost
# Feb  2 22:53:02 freenas ctld[1715]: child process 56870 terminated with exit status 1
#
# Insert the following directly under existing sylog-ng filter rules, adjust your IP address and trigger "service syslog-ng restart"


filter f_cut_ctld01 {
  program("ctld") and
  message("192.168.160.10: read: connection lost"); };
filter f_cut_ctld02 {
  program("ctld") and
  message("child process") and
  message("terminated with exit status 1"); };

log { source(src); filter(f_cut_ctld01); flags(final); };
log { source(src); filter(f_cut_ctld02); flags(final); };
This fix is not working for me? Im just adding a few lines under syslog-ng.conf?
 
Top