-1

I'm getting this error message after install ClamAV from direcadmin message system. OS: CentOs 5.

The service 'clamd' on server starhost.net is currently down This message has been automatically generated notifying you that the service clamd is currently down.

Why can I get this error for each hour? I checked up cron jobs and I couldn't find any job about it.

How to control Clamd service?

OS: CentOS with DirectAdmin

RedLEON
  • 15
  • 3
  • 9
  • I gave this command: `# service clamd start` I got this error: `Starting clamd: LibClamAV Error: cli_loaddb(): No supported database files found in /usr/share/clamav ERROR: Can't open file or directory` – RedLEON Jul 27 '12 at 19:40
  • When you run `freshclam` and then try to start the `clamd` service, what happens? `freshclam` should update/download the latest antivirus DB files. – cjc Jul 27 '12 at 20:59
  • freshclam -v It doesn't give any error. `Current working dir is /var/lib/clamav Max retries == 3 ClamAV update process started at Sat Jul 28 00:29:17 2012 Using IPv6 aware code Querying current.cvd.clamav.net TTL: 94 Software version from DNS: 0.97.5 main.cvd version from DNS: 54 main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven) daily.cvd version from DNS: 15185 daily.cld is up to date (version: 15185, sigs: 239672, f-level: 63, builder: guitar) bytecode.cvd version from DNS: 188 bytecode.cvd is up to date (version: 188, sigs: 38, f-level: 63, builder: neo)` – RedLEON Jul 27 '12 at 21:30
  • Ah, freshclam is putting the files into `/var/lib/clamav`. Check your clamd.conf for what the database directory is set to (presumably /usr/share/clamav), and point it at the location used by freshclam. – cjc Jul 27 '12 at 21:32
  • Why freshclam is searching the database in "/var/lib/clamav" directory. How can I change this option? I mean, freschclam update db files to "/var/lib/clamv" but clamd service looking for that files in "usr/share/clamav". – RedLEON Jul 27 '12 at 21:49
  • You can edit the configuration files /etc/clamd.conf or /etc/feshclam.conf, and set the database directories to be the same. I think `/var/lib/clamav` is actually more appropriate for constantly changing database files, rather than something in /usr/share, actually, so I would change /etc/clamd.conf. – cjc Jul 28 '12 at 04:10
  • I throught that I installed clamav twice. One of them `yum install clamav` the other one installed with `./build update clamav`. I thought if I uninstall clamav with `yum remove clamav` and after run `./build update clamav` command the problem will be repair. – RedLEON Jul 28 '12 at 11:14
  • And now, Clamd service working very fine. Thank you very much – RedLEON Jul 28 '12 at 11:16
  • I've consolidated the comments as an Answer, if you can accept it, we'll close out this Question. – cjc Jul 28 '12 at 21:35
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Apr 09 '15 at 00:23

1 Answers1

3

There was a mismatch between the antivirus database directories used by freshclam and clamd. The /etc/freshclam.conf settingDatabaseDirectory was apparently pointing to /var/lib/clamav (which is default for the package), but the corresponding setting in /etc/clamd.conf was pointing to /usr/share/clamav. This mismatch may have been because the OP had compiled clamav on his own.

Once the DatabaseDirectory settings were reconciled between the configuration files, clamd could see the antivirus database and start up successfully.

cjc
  • 24,916
  • 3
  • 51
  • 70