Clamd has a FixStaleSocket option that is default on.
FixStaleSocket will unlink the lingering stale socket and bind again if it 
failed to bind when restarting clamd.

# Remove stale socket after unclean shutdown.
# Default: yes
#FixStaleSocket yes

I all ears if anyone knows of a better way to remove the stale socket on death 
instead of on startup.
As Ged Haywood suggested, your best option may be to have an ad-hoc watchdog 
script monitor clamd and kill the socket if clamd become unresponsive for too 
long.

That said, if you figure out which file was killing clamd, I'd love to have a 
sample so I can try to fix the bug.  It would be very helpful.

Regards,
Micah


Micah Snyder
ClamAV Development
Talos
Cisco Systems, Inc.


On Sep 20, 2018, at 3:47 AM, Karl Pielorz 
<kpielorz_...@tdx.co.uk<mailto:kpielorz_...@tdx.co.uk>> wrote:



--On 19 September 2018 16:43 +0000 "Micah Snyder (micasnyd)" 
<micas...@cisco.com<mailto:micas...@cisco.com>> wrote:

Alternatively, you could switch your clamd.conf to use a TCP Socket.
Just make sure it isn't internet accessible.

Hi,

I'd have to look into this as the software talking to ClamAV expects a local 
unix domain socket, I don't know if it supports a TCP socket.

Do you know if ClamD the "usual" unix trick of unlinking the file before it 
binds it? - i.e. is there any way of avoiding a stale / lingering socket on 
death (any death).

-Kp
_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net<mailto:clamav-users@lists.clamav.net>
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to