clamav 0.99.3+addedllvm-0ubuntu0.16.04.1 reports (Cannot connect to unix socket '/var/lib/clamav/clamd.socket': connect: No such file or directory)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












Yesterday I updated from ClamAV 99.2 to ClamAV 99.3 (version shown in the subject). Since then I've had an issue where the clamd.socket file is not being created in /var/lib/clamav as it had in previous versions. Here are my configuration files:



/ect/clamav/clamd.conf 
TCPSocket 3310
TCPAddr 127.0.0.1
TemporaryDirectory /var/tmp
User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 300
MaxThreads 10
MaxConnectionQueueLength 15
LogSyslog true
LogRotate false
LogFacility LOG_MAIL
LogClean false
LogVerbose yes
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly no
SelfCheck 600
Foreground false
Debug false
ScanPE yes
MaxEmbeddedPE 10M
ScanOLE2 yes
ScanPDF yes
ScanHTML yes
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM yes
LeaveTemporaryFiles false
AlgorithmicDetection yes
ScanELF yes
IdleTimeout 30
CrossFilesystems true
PhishingSignatures yes
PhishingScanURLs yes
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA yes
ScanPartialMessages false
HeuristicScanPrecedence yes
StructuredDataDetection no
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo yes
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 50M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StatsEnabled true
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamd.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /var/lib/clamav/clamd.pid


My /etc/systemd/system/clamav-daemon.socket.d/extend.conf



[Socket]
ListenStream=
SocketUser=clamav
ListenStream=127.0.0.1:3310


My /lib/systemd/system/clamav-daemon.socket



[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.ne/lang/en/doc/
ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

[Install]
WantedBy=sockets.target


NOTE: I do not have a clamd.ctl file anywhere that I can find



Syslog output when I run sudo service clamav-daemon start



Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost clamd[6544]: Received 1 file descriptor(s) from systemd.
Jan 31 16:37:12 localhost clamd[6544]: clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Jan 31 16:37:12 localhost clamd[6544]: Running as user clamav (UID 121, GID 130)
Jan 31 16:37:12 localhost clamd[6544]: Log file size limited to 4294967295 bytes.
Jan 31 16:37:12 localhost clamd[6544]: Reading databases from /var/lib/clamav
Jan 31 16:37:12 localhost clamd[6544]: Bytecode: Security mode set to "TrustSigned".
Jan 31 16:37:29 localhost clamd[6544]: Loaded 6629236 signatures.
Jan 31 16:37:31 localhost clamd[6544]: TCP: Received AF_INET SOCK_STREAM socket from systemd.
Jan 31 16:37:31 localhost clamd[6544]: LOCAL: No local AF_UNIX SOCK_STREAM socket received from systemd.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.


Output of sudo systemctl status clamav-daemon.socket



● clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.socket; enabled; vendor pre
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
└─extend.conf
Active: active (running) since Wed 2018-01-31 16:37:07 CST; 27min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Listen: 127.0.0.1:3310 (Stream)

Jan 31 16:37:07 localhost systemd[1]: Closed Socket for Clam AntiVirus userspace
Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspa
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus use


Output of sudo systemctl status clamav-daemon.service



● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor pr
Active: active (running) since Wed 2018-01-31 16:37:12 CST; 28min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Main PID: 6544 (clamd)
CGroup: /system.slice/clamav-daemon.service
└─6544 /usr/sbin/clamd --foreground=true

Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.


Any assistance would be appreciated. I would have though this would be a direct drop-in upgrade however so far it hasn't. I've spent close to two days on Google so far with no headway.










share|improve this question





















  • Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
    – Terrance
    Feb 1 at 3:36










  • I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
    – Chris Pollock
    Feb 2 at 13:56











  • Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
    – Terrance
    Feb 2 at 15:00















up vote
1
down vote

favorite












Yesterday I updated from ClamAV 99.2 to ClamAV 99.3 (version shown in the subject). Since then I've had an issue where the clamd.socket file is not being created in /var/lib/clamav as it had in previous versions. Here are my configuration files:



/ect/clamav/clamd.conf 
TCPSocket 3310
TCPAddr 127.0.0.1
TemporaryDirectory /var/tmp
User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 300
MaxThreads 10
MaxConnectionQueueLength 15
LogSyslog true
LogRotate false
LogFacility LOG_MAIL
LogClean false
LogVerbose yes
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly no
SelfCheck 600
Foreground false
Debug false
ScanPE yes
MaxEmbeddedPE 10M
ScanOLE2 yes
ScanPDF yes
ScanHTML yes
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM yes
LeaveTemporaryFiles false
AlgorithmicDetection yes
ScanELF yes
IdleTimeout 30
CrossFilesystems true
PhishingSignatures yes
PhishingScanURLs yes
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA yes
ScanPartialMessages false
HeuristicScanPrecedence yes
StructuredDataDetection no
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo yes
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 50M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StatsEnabled true
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamd.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /var/lib/clamav/clamd.pid


My /etc/systemd/system/clamav-daemon.socket.d/extend.conf



[Socket]
ListenStream=
SocketUser=clamav
ListenStream=127.0.0.1:3310


My /lib/systemd/system/clamav-daemon.socket



[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.ne/lang/en/doc/
ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

[Install]
WantedBy=sockets.target


NOTE: I do not have a clamd.ctl file anywhere that I can find



Syslog output when I run sudo service clamav-daemon start



Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost clamd[6544]: Received 1 file descriptor(s) from systemd.
Jan 31 16:37:12 localhost clamd[6544]: clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Jan 31 16:37:12 localhost clamd[6544]: Running as user clamav (UID 121, GID 130)
Jan 31 16:37:12 localhost clamd[6544]: Log file size limited to 4294967295 bytes.
Jan 31 16:37:12 localhost clamd[6544]: Reading databases from /var/lib/clamav
Jan 31 16:37:12 localhost clamd[6544]: Bytecode: Security mode set to "TrustSigned".
Jan 31 16:37:29 localhost clamd[6544]: Loaded 6629236 signatures.
Jan 31 16:37:31 localhost clamd[6544]: TCP: Received AF_INET SOCK_STREAM socket from systemd.
Jan 31 16:37:31 localhost clamd[6544]: LOCAL: No local AF_UNIX SOCK_STREAM socket received from systemd.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.


Output of sudo systemctl status clamav-daemon.socket



● clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.socket; enabled; vendor pre
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
└─extend.conf
Active: active (running) since Wed 2018-01-31 16:37:07 CST; 27min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Listen: 127.0.0.1:3310 (Stream)

Jan 31 16:37:07 localhost systemd[1]: Closed Socket for Clam AntiVirus userspace
Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspa
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus use


Output of sudo systemctl status clamav-daemon.service



● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor pr
Active: active (running) since Wed 2018-01-31 16:37:12 CST; 28min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Main PID: 6544 (clamd)
CGroup: /system.slice/clamav-daemon.service
└─6544 /usr/sbin/clamd --foreground=true

Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.


Any assistance would be appreciated. I would have though this would be a direct drop-in upgrade however so far it hasn't. I've spent close to two days on Google so far with no headway.










share|improve this question





















  • Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
    – Terrance
    Feb 1 at 3:36










  • I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
    – Chris Pollock
    Feb 2 at 13:56











  • Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
    – Terrance
    Feb 2 at 15:00













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Yesterday I updated from ClamAV 99.2 to ClamAV 99.3 (version shown in the subject). Since then I've had an issue where the clamd.socket file is not being created in /var/lib/clamav as it had in previous versions. Here are my configuration files:



/ect/clamav/clamd.conf 
TCPSocket 3310
TCPAddr 127.0.0.1
TemporaryDirectory /var/tmp
User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 300
MaxThreads 10
MaxConnectionQueueLength 15
LogSyslog true
LogRotate false
LogFacility LOG_MAIL
LogClean false
LogVerbose yes
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly no
SelfCheck 600
Foreground false
Debug false
ScanPE yes
MaxEmbeddedPE 10M
ScanOLE2 yes
ScanPDF yes
ScanHTML yes
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM yes
LeaveTemporaryFiles false
AlgorithmicDetection yes
ScanELF yes
IdleTimeout 30
CrossFilesystems true
PhishingSignatures yes
PhishingScanURLs yes
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA yes
ScanPartialMessages false
HeuristicScanPrecedence yes
StructuredDataDetection no
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo yes
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 50M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StatsEnabled true
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamd.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /var/lib/clamav/clamd.pid


My /etc/systemd/system/clamav-daemon.socket.d/extend.conf



[Socket]
ListenStream=
SocketUser=clamav
ListenStream=127.0.0.1:3310


My /lib/systemd/system/clamav-daemon.socket



[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.ne/lang/en/doc/
ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

[Install]
WantedBy=sockets.target


NOTE: I do not have a clamd.ctl file anywhere that I can find



Syslog output when I run sudo service clamav-daemon start



Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost clamd[6544]: Received 1 file descriptor(s) from systemd.
Jan 31 16:37:12 localhost clamd[6544]: clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Jan 31 16:37:12 localhost clamd[6544]: Running as user clamav (UID 121, GID 130)
Jan 31 16:37:12 localhost clamd[6544]: Log file size limited to 4294967295 bytes.
Jan 31 16:37:12 localhost clamd[6544]: Reading databases from /var/lib/clamav
Jan 31 16:37:12 localhost clamd[6544]: Bytecode: Security mode set to "TrustSigned".
Jan 31 16:37:29 localhost clamd[6544]: Loaded 6629236 signatures.
Jan 31 16:37:31 localhost clamd[6544]: TCP: Received AF_INET SOCK_STREAM socket from systemd.
Jan 31 16:37:31 localhost clamd[6544]: LOCAL: No local AF_UNIX SOCK_STREAM socket received from systemd.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.


Output of sudo systemctl status clamav-daemon.socket



● clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.socket; enabled; vendor pre
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
└─extend.conf
Active: active (running) since Wed 2018-01-31 16:37:07 CST; 27min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Listen: 127.0.0.1:3310 (Stream)

Jan 31 16:37:07 localhost systemd[1]: Closed Socket for Clam AntiVirus userspace
Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspa
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus use


Output of sudo systemctl status clamav-daemon.service



● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor pr
Active: active (running) since Wed 2018-01-31 16:37:12 CST; 28min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Main PID: 6544 (clamd)
CGroup: /system.slice/clamav-daemon.service
└─6544 /usr/sbin/clamd --foreground=true

Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.


Any assistance would be appreciated. I would have though this would be a direct drop-in upgrade however so far it hasn't. I've spent close to two days on Google so far with no headway.










share|improve this question













Yesterday I updated from ClamAV 99.2 to ClamAV 99.3 (version shown in the subject). Since then I've had an issue where the clamd.socket file is not being created in /var/lib/clamav as it had in previous versions. Here are my configuration files:



/ect/clamav/clamd.conf 
TCPSocket 3310
TCPAddr 127.0.0.1
TemporaryDirectory /var/tmp
User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 300
MaxThreads 10
MaxConnectionQueueLength 15
LogSyslog true
LogRotate false
LogFacility LOG_MAIL
LogClean false
LogVerbose yes
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly no
SelfCheck 600
Foreground false
Debug false
ScanPE yes
MaxEmbeddedPE 10M
ScanOLE2 yes
ScanPDF yes
ScanHTML yes
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM yes
LeaveTemporaryFiles false
AlgorithmicDetection yes
ScanELF yes
IdleTimeout 30
CrossFilesystems true
PhishingSignatures yes
PhishingScanURLs yes
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA yes
ScanPartialMessages false
HeuristicScanPrecedence yes
StructuredDataDetection no
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo yes
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 50M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StatsEnabled true
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamd.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /var/lib/clamav/clamd.pid


My /etc/systemd/system/clamav-daemon.socket.d/extend.conf



[Socket]
ListenStream=
SocketUser=clamav
ListenStream=127.0.0.1:3310


My /lib/systemd/system/clamav-daemon.socket



[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.ne/lang/en/doc/
ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

[Install]
WantedBy=sockets.target


NOTE: I do not have a clamd.ctl file anywhere that I can find



Syslog output when I run sudo service clamav-daemon start



Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost clamd[6544]: Received 1 file descriptor(s) from systemd.
Jan 31 16:37:12 localhost clamd[6544]: clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Jan 31 16:37:12 localhost clamd[6544]: Running as user clamav (UID 121, GID 130)
Jan 31 16:37:12 localhost clamd[6544]: Log file size limited to 4294967295 bytes.
Jan 31 16:37:12 localhost clamd[6544]: Reading databases from /var/lib/clamav
Jan 31 16:37:12 localhost clamd[6544]: Bytecode: Security mode set to "TrustSigned".
Jan 31 16:37:29 localhost clamd[6544]: Loaded 6629236 signatures.
Jan 31 16:37:31 localhost clamd[6544]: TCP: Received AF_INET SOCK_STREAM socket from systemd.
Jan 31 16:37:31 localhost clamd[6544]: LOCAL: No local AF_UNIX SOCK_STREAM socket received from systemd.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.


Output of sudo systemctl status clamav-daemon.socket



● clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.socket; enabled; vendor pre
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
└─extend.conf
Active: active (running) since Wed 2018-01-31 16:37:07 CST; 27min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Listen: 127.0.0.1:3310 (Stream)

Jan 31 16:37:07 localhost systemd[1]: Closed Socket for Clam AntiVirus userspace
Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspa
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus use


Output of sudo systemctl status clamav-daemon.service



● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor pr
Active: active (running) since Wed 2018-01-31 16:37:12 CST; 28min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
Main PID: 6544 (clamd)
CGroup: /system.slice/clamav-daemon.service
└─6544 /usr/sbin/clamd --foreground=true

Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.


Any assistance would be appreciated. I would have though this would be a direct drop-in upgrade however so far it hasn't. I've spent close to two days on Google so far with no headway.







clamav






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 1 at 1:18









Chris Pollock

76110




76110











  • Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
    – Terrance
    Feb 1 at 3:36










  • I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
    – Chris Pollock
    Feb 2 at 13:56











  • Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
    – Terrance
    Feb 2 at 15:00

















  • Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
    – Terrance
    Feb 1 at 3:36










  • I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
    – Chris Pollock
    Feb 2 at 13:56











  • Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
    – Terrance
    Feb 2 at 15:00
















Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
– Terrance
Feb 1 at 3:36




Have you tried running sudo dpkg-reconfigure clamav-daemon and reconfigure it to use the UNIX socket?
– Terrance
Feb 1 at 3:36












I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
– Chris Pollock
Feb 2 at 13:56





I did that Terrnace, and it did create the clamd.socket file in /var/lib/clamav. However, another issue popped up where after a database update of either the official or unofficial sigs it would report Can't connect to clamd on 127.0.0.1:3310: Connection refused. After some comments on the ClamAV list and more Googling I found [Google] serverfault.com/questions/798587/… it shows to modify your /lib/systemd/system/clamav-daemon.socket and /etc/systemd/system/clamav-daemon.socket.d/extend.conf which fixes the issue.
– Chris Pollock
Feb 2 at 13:56













Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
– Terrance
Feb 2 at 15:00





Glad that you were able to fix your problem. Feel free to answer your own question with the steps it took. It is actually encouraged here so that others that might have the same problem can know how to fix their issue. Also, remember that after you write your own answer to accept it as the correct answer after the allotted time. :)
– Terrance
Feb 2 at 15:00











1 Answer
1






active

oldest

votes

















up vote
1
down vote













After several days of Googling different issues similar to mine I hit upon the right one here - [Google]https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp-3310 which fixed the problem. The steps I took were to make the below changes to the files shown:



/etc/systemd/system/clamav-daemon.socket.d/extend.conf 
[Socket]
ListenStream=
SocketUser=clamav
ListenStream=/var/lib/clamav/clamd.socket

/lib/systemd/system/clamav-daemon.socket
[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
# Check for database existence
ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

[Socket]
#ListenStream=/run/clamav/clamd.ctl
ListenStream=/var/lib/clamav/clamd.socket
ListenStream=127.0.0.1:3310
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True
[Install]
WantedBy=sockets.target


After doing this you'll have to run systemctl daemon-reload then you can start the clamav-daemon again sudo service clamav-daemon start or you may have to start the daemon with sudo /etc/init.d/clamav-daemon start. Since I did all the above I've had no problems.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001915%2fclamav-0-99-3addedllvm-0ubuntu0-16-04-1-reports-cannot-connect-to-unix-socket%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    After several days of Googling different issues similar to mine I hit upon the right one here - [Google]https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp-3310 which fixed the problem. The steps I took were to make the below changes to the files shown:



    /etc/systemd/system/clamav-daemon.socket.d/extend.conf 
    [Socket]
    ListenStream=
    SocketUser=clamav
    ListenStream=/var/lib/clamav/clamd.socket

    /lib/systemd/system/clamav-daemon.socket
    [Unit]
    Description=Socket for Clam AntiVirus userspace daemon
    Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
    # Check for database existence
    ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
    ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

    [Socket]
    #ListenStream=/run/clamav/clamd.ctl
    ListenStream=/var/lib/clamav/clamd.socket
    ListenStream=127.0.0.1:3310
    SocketUser=clamav
    SocketGroup=clamav
    RemoveOnStop=True
    [Install]
    WantedBy=sockets.target


    After doing this you'll have to run systemctl daemon-reload then you can start the clamav-daemon again sudo service clamav-daemon start or you may have to start the daemon with sudo /etc/init.d/clamav-daemon start. Since I did all the above I've had no problems.






    share|improve this answer
























      up vote
      1
      down vote













      After several days of Googling different issues similar to mine I hit upon the right one here - [Google]https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp-3310 which fixed the problem. The steps I took were to make the below changes to the files shown:



      /etc/systemd/system/clamav-daemon.socket.d/extend.conf 
      [Socket]
      ListenStream=
      SocketUser=clamav
      ListenStream=/var/lib/clamav/clamd.socket

      /lib/systemd/system/clamav-daemon.socket
      [Unit]
      Description=Socket for Clam AntiVirus userspace daemon
      Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
      # Check for database existence
      ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
      ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

      [Socket]
      #ListenStream=/run/clamav/clamd.ctl
      ListenStream=/var/lib/clamav/clamd.socket
      ListenStream=127.0.0.1:3310
      SocketUser=clamav
      SocketGroup=clamav
      RemoveOnStop=True
      [Install]
      WantedBy=sockets.target


      After doing this you'll have to run systemctl daemon-reload then you can start the clamav-daemon again sudo service clamav-daemon start or you may have to start the daemon with sudo /etc/init.d/clamav-daemon start. Since I did all the above I've had no problems.






      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        After several days of Googling different issues similar to mine I hit upon the right one here - [Google]https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp-3310 which fixed the problem. The steps I took were to make the below changes to the files shown:



        /etc/systemd/system/clamav-daemon.socket.d/extend.conf 
        [Socket]
        ListenStream=
        SocketUser=clamav
        ListenStream=/var/lib/clamav/clamd.socket

        /lib/systemd/system/clamav-daemon.socket
        [Unit]
        Description=Socket for Clam AntiVirus userspace daemon
        Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
        # Check for database existence
        ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
        ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

        [Socket]
        #ListenStream=/run/clamav/clamd.ctl
        ListenStream=/var/lib/clamav/clamd.socket
        ListenStream=127.0.0.1:3310
        SocketUser=clamav
        SocketGroup=clamav
        RemoveOnStop=True
        [Install]
        WantedBy=sockets.target


        After doing this you'll have to run systemctl daemon-reload then you can start the clamav-daemon again sudo service clamav-daemon start or you may have to start the daemon with sudo /etc/init.d/clamav-daemon start. Since I did all the above I've had no problems.






        share|improve this answer












        After several days of Googling different issues similar to mine I hit upon the right one here - [Google]https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp-3310 which fixed the problem. The steps I took were to make the below changes to the files shown:



        /etc/systemd/system/clamav-daemon.socket.d/extend.conf 
        [Socket]
        ListenStream=
        SocketUser=clamav
        ListenStream=/var/lib/clamav/clamd.socket

        /lib/systemd/system/clamav-daemon.socket
        [Unit]
        Description=Socket for Clam AntiVirus userspace daemon
        Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
        # Check for database existence
        ConditionPathExistsGlob=/var/lib/clamav/main.c[vl]d,inc
        ConditionPathExistsGlob=/var/lib/clamav/daily.c[vl]d,inc

        [Socket]
        #ListenStream=/run/clamav/clamd.ctl
        ListenStream=/var/lib/clamav/clamd.socket
        ListenStream=127.0.0.1:3310
        SocketUser=clamav
        SocketGroup=clamav
        RemoveOnStop=True
        [Install]
        WantedBy=sockets.target


        After doing this you'll have to run systemctl daemon-reload then you can start the clamav-daemon again sudo service clamav-daemon start or you may have to start the daemon with sudo /etc/init.d/clamav-daemon start. Since I did all the above I've had no problems.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 3 at 23:23









        Chris Pollock

        76110




        76110



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001915%2fclamav-0-99-3addedllvm-0ubuntu0-16-04-1-reports-cannot-connect-to-unix-socket%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491