Link to home
Start Free TrialLog in
Avatar of MichaelBalack
MichaelBalackFlag for Singapore

asked on

Why clamav service failed to start?

This is using AWS Amazon Linux instance. I want to setup clamav onto this instance. Please see the setup as follows,

     1. sudo yum install clamav clamav-scanner-sysvinit clamav-update; setup completed successfully
     2. sudo freshclam;  Anti-virus signatures downloaded successfully
     3. chmod -R clamscan.clamscan /var/log/clamd.scan
         chmod -R clamscan.clamscan /var/run/clamd.scan
         chmod -R clamscan.clamscan /usr/lib/clamd.scan

         all applied successfully
     4. However, attempt to start daemon - clamd.scan failed.

         service clamd.scan start;  
         result:  Starting clamd.scan         [Failed]
     5. Manual scanning using "clamscan -r" is completed successful.

Please see the attached /etc/clamd.d/scan.conf as attached.
scan.txt
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Has it created the log?
Avatar of MichaelBalack

ASKER

Hi Vadim,

Where to check the log?
You should be able to specify log file in clamd.conf - see https://linux.die.net/man/5/clamd.conf . By default, there's no log.
Hi Vadim,

The log file is located in /var/log/clamd.scan. See the attachment when attempt to start the clamd.scan service.

Look like is failed "to allocate memory". However, when typing "free -m", there are about 600 Mb RAM available.
AWS-AMI---clamd.scan.JPG
ASKER CERTIFIED SOLUTION
Avatar of MichaelBalack
MichaelBalack
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forget 2 commands,

chown root.root /swapfile
chmod 600 /swapfile
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MichaelBalack, so it looks like the problem is resolved, is there anything else we can help you with?
No.
Hi Prabhin,

Freshclam updated the virus signatures successfully.
Thank for the 3 listed experts in suggesting, and assisting, that pointed to the direction led to problem resolution.