Hello, i try to run clamav-daemon, but when i press start icon nothing happend
Logs:
systemctl status clamav-freshclam
root@mail:/home/hestiacp# systemctl status clamav-freshclam
â—Ź clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; ven>
Active: active (running) since Mon 2024-05-06 22:49:37 CEST; 3 months 29 d>
Docs: man:freshclam(1)
man:freshclam.conf(5)
https://docs.clamav.net/
Main PID: 1240 (freshclam)
Tasks: 1 (limit: 9481)
Memory: 121.3M
CPU: 34min 39.689s
CGroup: /system.slice/clamav-freshclam.service
└─1240 /usr/bin/freshclam -d --foreground=true
Sep 04 08:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 08:01:51 202>
Sep 04 08:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 08:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 202>
lines 1-23…skipping…
â—Ź clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-05-06 22:49:37 CEST; 3 months 29 days ago
Docs: man:freshclam(1)
man:freshclam.conf(5)
https://docs.clamav.net/
Main PID: 1240 (freshclam)
Tasks: 1 (limit: 9481)
Memory: 121.3M
CPU: 34min 39.689s
CGroup: /system.slice/clamav-freshclam.service
└─1240 /usr/bin/freshclam -d --foreground=true
Sep 04 08:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 08:01:51 2024 → main.cld database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Sep 04 08:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 08:01:51 2024 → bytecode.cld database is up-to-date (version: 335, sigs: 86, f-level: 90, builder: raynman)
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → Received signal: wake up
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → ClamAV update process started at Wed Sep 4 09:01:51 2024
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → ^Your ClamAV installation is OUTDATED!
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → ^Local version: 0.103.7 Recommended version: 0.103.11
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → DON’T PANIC! Read Installing - ClamAV Documentation
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → daily.cld database is up-to-date (version: 27387, sigs: 2066357, f-level: 90, builder: raynman)
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → main.cld database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Sep 04 09:01:51 mail.mail.uk freshclam[1240]: Wed Sep 4 09:01:51 2024 → bytecode.cld database is up-to-date (version: 335, sigs: 86, f-level: 90, builder: raynman)
systemctl status clamav-daemon.service
and paste please what U see after click edit icon (near restart)
How much RAM does your server have? Clamavd consume a lot of memory, on one of my servers it is 1.5GB, on the other I had to turn it off
root@mail:/home/hestiacp# systemctl status clamav-daemon.service
â—Ź clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf
Active: active (running) since Tue 2024-06-04 11:47:50 CEST; 3 months 0 days ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://docs.clamav.net/
Process: 3376966 ExecStartPre=/bin/mkdir -p /run/clamav (code=exited, status=0/SUCCESS)
Process: 3376967 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
Main PID: 3376968 (clamd)
Tasks: 2 (limit: 9481)
Memory: 1.8G
CPU: 2h 28min 46.638s
CGroup: /system.slice/clamav-daemon.service
└─3376968 /usr/sbin/clamd --foreground=true
Sep 04 09:25:36 mail.mail.uk clamd[3376968]: LibClamAV info: Display URL: www.allegro.pl
Sep 04 09:25:36 mail.mail.uk clamd[3376968]: Wed Sep 4 09:25:36 2024 → ~/var/spool/exim4/scan/1slkOW-006MY6-Ak/1slkOW-006MY6-Ak.eml: Heuristics.Phishing.Email.SpoofedDomain FOUND
Sep 04 09:55:20 mail.mail.uk clamd[3376968]: Wed Sep 4 09:55:20 2024 → SelfCheck: Database status OK.
Sep 04 10:57:51 mail.mail.uk clamd[3376968]: Wed Sep 4 10:57:51 2024 → SelfCheck: Database status OK.
Sep 04 11:02:12 mail.mail.uk clamd[3376968]: Wed Sep 4 11:02:12 2024 → Reading databases from /var/lib/clamav
Sep 04 11:02:44 mail.mail.uk clamd[3376968]: Wed Sep 4 11:02:44 2024 → Database correctly reloaded (8697948 signatures)
Sep 04 11:02:44 mail.mail.uk clamd[3376968]: Wed Sep 4 11:02:44 2024 → Activating the newly loaded database…
Sep 04 12:00:50 mail.mail.uk clamd[3376968]: Wed Sep 4 12:00:50 2024 → SelfCheck: Database status OK.
Sep 04 13:01:15 mail.mail.uk clamd[3376968]: Wed Sep 4 13:01:15 2024 → SelfCheck: Database status OK.
Sep 04 14:05:21 mail.mail.uk clamd[3376968]: Wed Sep 4 14:05:21 2024 → SelfCheck: Database status OK.
root@mail:/home/hestiacp#
and paste please what U see after click edit icon (near restart)
#Automatically Generated by clamav-daemon postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-daemon
#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details
LocalSocket /run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666
.# TemporaryDirectory is not set to its default /tmp here to make overriding
.# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogRotate true
LogFacility LOG_LOCAL6
LogClean false
LogVerbose true
PreludeEnable no
PreludeAnalyzerName ClamAV
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly false
SelfCheck 3600
Foreground false
Debug false
ScanPE true
MaxEmbeddedPE 10M
ScanOLE2 true
ScanPDF true
ScanHTML true
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
CrossFilesystems true
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA false
ScanPartialMessages false
HeuristicScanPrecedence false
StructuredDataDetection false
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo true
OLE2BlockMacros false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanTime 120000
MaxScanSize 100M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StreamMaxLength 25M
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /run/clamav/clamd.pid
OnAccessMaxFileSize 5M
How much RAM does your server have?
8GB
Is this problem still exist?
Check:
/usr/local/hestia/bin/v-list-sys-services
(what state have clamav-daemon)
check in one console:
tail -f /usr/local/hestia/log/system.log
and run in other:
/usr/local/hestia/bin/v-restart-service clamav-daemon
it seems to me that clamavd works normally for you, only the panel shows it incorrectly.
root@mailserver:/var/log# /usr/local/hestia/bin/v-list-sys-services
NAME STATE CPU MEM UPTIME
apache2 running 0 472 82
php7.4-fpm running 0 9 82
php8.0-fpm running 0.9 20 82
nginx running 0.3 26 82
bind9 running 0.2 130 82
exim4 running 0 1 82
dovecot running 0 0 82
clamav-daemon stopped 0 0 0
spamassassin running 1.1 437 82
mariadb running 0.2 531 82
vsftpd running 0 0 82
cron running 0 0 81
ssh running 0 3 82
iptables running 0 0 0
fail2ban running 0.5 166 82
After command: /usr/local/hestia/bin/v-restart-service clamav-daemon its also stopped
Also you can login in the hestiacp panel > config > found the clamav-daemon service > edit with the pencil > check “restart” for use default setings > click in Save
Also you can copy&paste the default config of hestiacp from here:
install/deb/clamav/clamd.conf
I’m not an expert, someone can write a better option… but I try to uninstall and install again.
First I do:
systemctl stop clamav-daemon.service
systemctl stop clamav-freshclam.service
systemctl disable clamav-daemon.service
systemctl disable clamav-freshclam.service
(Stop>Disable>Uninstall)
Them:
v-change-sys-config-value ANTIVIRUS_SYSTEM ''
For disable in Hestia
And for finish:
systemctl restart exim4
If want remove configuration and files, can delete:
rm -rf /etc/clamav/
rm -rf /var/lib/clamav/
Who want a permanent disabled, must change in
/etc/exim/exim4.conf.template
From: CLAMD = yes
to CLAMD = no
Ok, now I wil install again with this:
apt update
apt install clamav-daemon
Now update the database:
freshclam
This is the next:
sudo systemctl start clamav-daemon
sudo systemctl enable clamav-daemon
A pretty:
systemctl restart clamav-daemon
And for finish a:
service exim4 restart
That what I do… maybe this can help you.
Try systemctl status clamav first
systemctl status clamav-daemon
â—Ź clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf
Active: active (running) since Wed 2025-04-02 10:06:48 CEST; 5 days ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://docs.clamav.net/
Process: 52752 ExecStartPre=/bin/mkdir -p /run/clamav (code=exited, status=0/SUCCESS)
Process: 52753 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
Main PID: 52754
Tasks: 3 (limit: 9481)
Memory: 1.4G
CPU: 11min 28.721s
CGroup: /system.slice/clamav-daemon.service
└─52754 /usr/sbin/clamd --foreground=true