[Solved] [ClamAV] Failed to start clamav daemon.

Problems with packages? Post here, using [tags] of the package name.

[Solved] [ClamAV] Failed to start clamav daemon.

Postby Flambaz » Sat Aug 17, 2013 7:02 pm

Hi everyone,

I just received my Raspberry Pi B a few days ago and I am facing a problem with ClamAV :(
Since I am going to use my Pi as a server, I need to be sure that the files which are going to be uploaded does not have virus.

I installed ClamAV, I have updated the databases with freshclam.
$this->bbcode_second_pass_code('', 'freshclam')
I had a problem with the update but normally, I have solved it by following the wiki (https://wiki.archlinux.org/index.php/Cl ... T_notified)

Then, I enabled freshclam.service
$this->bbcode_second_pass_code('', 'systemctl enable freshclam')
No problem.

But when I try to start clamav daemon with this command
$this->bbcode_second_pass_code('', 'systemctl enable clamd')
The command takes a while and give me this answer :
$this->bbcode_second_pass_code('', '
août 17 20:28:52 FlambazPi systemd[1]: Starting clamav daemon...
-- Subject: Unit clamd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit clamd.service has begun starting up.
août 17 20:30:22 FlambazPi systemd[1]: clamd.service operation timed out. Terminating.
août 17 20:30:22 FlambazPi systemd[1]: Failed to start clamav daemon.
-- Subject: Unit clamd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit clamd.service has failed.
--
-- The result is failed.
août 17 20:30:22 FlambazPi systemd[1]: Unit clamd.service entered failed state.
')

It has been two hours since I got this problem and my friend Google did not give me answers.

Does anyone have faced that problem?
Or is there anyone who can help me?

P.S : Since I am not English nor American, I am sorry if my english is a bit bad. I am trying my best :)
Last edited by Flambaz on Sun Aug 18, 2013 7:48 pm, edited 1 time in total.
Flambaz
 
Posts: 5
Joined: Sat Aug 17, 2013 6:35 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby pepedog » Sat Aug 17, 2013 9:16 pm

Probably you need swap, not on flash memory though.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [ClamAV] Failed to start clamav daemon.

Postby Flambaz » Sun Aug 18, 2013 10:04 am

$this->bbcode_second_pass_quote('', 'P')robably you need swap, not on flash memory though.


Thanks for your answer pepedog :)

Well, I already have activated my 2 GB partition of swap. Is it enough?

But I don't think it is the problem of memory since only 40 MB of RAM is used, the same quantity of memory is used by Swap...
Flambaz
 
Posts: 5
Joined: Sat Aug 17, 2013 6:35 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby WarheadsSE » Sun Aug 18, 2013 4:13 pm

Get us a detailed log of what happened, try journalctl -xn
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby Flambaz » Sun Aug 18, 2013 5:03 pm

Well, the big paragraph in my first post is what journalctl -xn gives me.
$this->bbcode_second_pass_code('', 'août 17 20:28:52 FlambazPi systemd[1]: Starting clamav daemon...
-- Subject: Unit clamd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit clamd.service has begun starting up.
août 17 20:30:22 FlambazPi systemd[1]: clamd.service operation timed out. Terminating.
août 17 20:30:22 FlambazPi systemd[1]: Failed to start clamav daemon.
-- Subject: Unit clamd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--')
Flambaz
 
Posts: 5
Joined: Sat Aug 17, 2013 6:35 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby pepedog » Sun Aug 18, 2013 5:39 pm

# clamd
ERROR: Please edit the example config file /etc/clamav/clamd.conf
ERROR: Can't open/parse the config file /etc/clamav/clamd.conf

Comment the obvious, as with fresclam.conf
# systemctl start clamd
# systemctl status clamd
clamd.service - clamav daemon
Loaded: loaded (/usr/lib/systemd/system/clamd.service; disabled)
Active: active (running) since Sun 2013-08-18 18:38:00 BST; 10s ago
Process: 21698 ExecStart=/usr/bin/clamd (code=exited, status=0/SUCCESS)
Main PID: 21699 (clamd)
CGroup: name=systemd:/system/clamd.service
`-21699 /usr/bin/clamd

Aug 18 18:38:00 alarmoid systemd[1]: Started clamav daemon.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [ClamAV] Failed to start clamav daemon.

Postby Flambaz » Sun Aug 18, 2013 6:34 pm

So first I restarted my Raspberry.
Here, you have the result of the commands

$this->bbcode_second_pass_code('', '# systemctl status clamd

clamd.service - clamav daemon
Loaded: loaded (/usr/lib/systemd/system/clamd.service; enabled)
Active: failed (Result: timeout) since dim. 2013-08-18 20:20:08 CEST; 2min 14s ago
Process: 140 ExecStart=/usr/bin/clamd (code=killed, signal=TERM)

janv. 01 01:00:13 FlambazPi clamd[140]: LibClamAV Warning: ******************************************************
janv. 01 01:00:13 FlambazPi clamd[140]: LibClamAV Warning: *** Virus database timestamp in the future! ***
janv. 01 01:00:13 FlambazPi clamd[140]: LibClamAV Warning: *** Please check the timezone and clock settings ***
janv. 01 01:00:13 FlambazPi clamd[140]: LibClamAV Warning: ******************************************************
août 18 20:20:08 FlambazPi systemd[1]: clamd.service operation timed out. Terminating.
août 18 20:20:08 FlambazPi systemd[1]: Failed to start clamav daemon.
août 18 20:20:08 FlambazPi systemd[1]: Unit clamd.service entered failed state.')
$this->bbcode_second_pass_code('', '# systemctl start clamd')
$this->bbcode_second_pass_code('', '# systemctl status clamd

clamd.service - clamav daemon
Loaded: loaded (/usr/lib/systemd/system/clamd.service; enabled)
Active: active (running) since dim. 2013-08-18 20:26:58 CEST; 42s ago
Process: 442 ExecStart=/usr/bin/clamd (code=exited, status=0/SUCCESS)
Main PID: 443 (clamd)
CGroup: name=systemd:/system/clamd.service
└─443 /usr/bin/clamd

août 18 20:25:40 FlambazPi systemd[1]: Starting clamav daemon...
août 18 20:26:58 FlambazPi systemd[1]: Started clamav daemon.')

So, it is working but only if I start the daemon manually... Maybe, I can put a script that restart the daemon every hour in the crontab. It is an alternative.

Still I don't understand why it can not start automatically.
Anyone knows why?
Flambaz
 
Posts: 5
Joined: Sat Aug 17, 2013 6:35 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby WarheadsSE » Sun Aug 18, 2013 6:50 pm

Probably due to the obvious timestamp warning.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [ClamAV] Failed to start clamav daemon.

Postby Flambaz » Sun Aug 18, 2013 7:47 pm

Well, that is weird but I consider my problem has solved.

Thank you for your help!! :)
Flambaz
 
Posts: 5
Joined: Sat Aug 17, 2013 6:35 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 11 guests