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

freenas ctld: read: connection lost

x0n

Newbie
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

Newbie
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

Member
Joined
Nov 6, 2018
Messages
71
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?
 

Hayze

Newbie
Joined
May 13, 2020
Messages
1
Even though this post was backed in 2016, from my experience and understanding, round robin is not the topology you want to use with a lagg setup even though its an available feature. Typically you would use if involved with 2 or 3 switches it works well in a trunked format (on certain switches). But when it comes to using software like proxmox and freenas doing round robin between the 2 servers, and your switch being the middle man can cause downtime issues down the road. Hence what you said about working for a little bit and then dropping and not working correctly anymore. Rebooting your network and switches wont do good in this situation either. Your best bet, is to setup LACP (or 802.11ad) if your switch is capable. It is most reliable.

My current setup has proxmox and freenas on the network, I am also running pfsense as my router, firewall, etc.
All 3 of these are running lagg, under LACP with an HP Procurve 2510-G switch.
(I had to use Putty and connect with a serial cable to make it happen.)

My % of downtime? 0, and i can reboot all day long, unplug cables, etc. Still keeping my 3 different lagg groups in shape.

If you were not able to get the round robin setup going, try using LACP, just make sure your switch has LACP enabled on the specific ports needed to run LAGG.
 

technight

Newbie
Joined
May 21, 2020
Messages
3
This fix is not working for me? Im just adding a few lines under syslog-ng.conf?
You have to add those lines at the end of the filter section of /conf/base/etc/local/syslog-ng.conf.freenas.
You can also do something like this:
Code:
ex /conf/base/etc/local/syslog-ng.conf.freenas <<eof
/filter f_not_arpchange { not filter(f_arpchange); };/ 2 insert
filter f_cut_ctld01 {
  program("ctld") and
  message("clientip: 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); };

.
xit
eof

cp /conf/base/etc/local/syslog-ng.conf.freenas /etc/local/syslog-ng.conf
service syslog-ng reload



Make sure that you replace clientip with e.g. your Proxmox ip.
 
Top