How to start the failed ClamD Service in WHM/cPanel Server?
cPanel / WHM
Most of the times, ClamD Service in WHM/cPanel Server fails to start and displays this error message.
Log of Initialization
Error in LibClamAV: cli tgzload: Checksum for file daily is invalid. hsb
LibClamAV Error: /usr/local/cpanel/3rdparty/share/clamav/daily cannot be loaded.
Reason: Corrupt database
This error indicates that the ClamAV virus definitions database file, daily.cld is corrupt and is unable to load during startup.
In most cases, this error occurs when the data files are altered suddenly. It can also happen when we stop an update in a premature stage through freshclam.
However, you can fix this error and start ClamD Service in WHM/cPanel Server by following these steps
- First , you have to repair the database. For this, you have to move the existing database files out of the way. Otherwise, you will not be able to duplicate the files.
- Next, you have to back up the file daily.cld by moving it into a new directory with the current date. You can use this command to for this task. mv/usr/local/cpanel/3rdparty/share/clamav/daily.cld{,.$( date +%Y%m%d )}
- However, if the startup error refers to a different file, you have to relocate that file.
- Then, you have to run freshclam to obtain the new database information. You can rebuild it once you have moved all the corrupt database files. You can use this command to execute it. /usr/local/cpanel/3rdparty/bin/freshclam
- Once you have completed these steps, you have to restart the ClamD service by using this restartsrv command: /scripts/restartsrvclamd
- The ClamD service will restart and function properly
At Velan, our server support engineers can help to install, configure and troubleshoot WHM/cPanel servers. If you wish to avail our service, please fill the Quick connect form and get in touch with us.