FS#45273 - [clamav] Daemon fails to start

Attached to Project: Arch Linux
Opened by Bar Hofesh (bararchy) - Tuesday, 09 June 2015, 08:47 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 11 July 2015, 19:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Daemon fails to start when system is powering on, maybe the service file should wait after network stack.

Logs:
Jun 09 09:48:35 ano systemd[1]: Starting clamav daemon...
Jun 09 09:48:42 ano clamd[509]: ERROR: TCP: getaddrinfo failed: Address family for hostname not supported
Jun 09 09:48:42 ano systemd[1]: clamd.service: control process exited, code=exited status=1
Jun 09 09:48:42 ano systemd[1]: Failed to start clamav daemon.
Jun 09 09:48:42 ano systemd[1]: Unit clamd.service entered failed state.
Jun 09 09:48:42 ano systemd[1]: clamd.service failed.

After manually systemctl restart clamd, the srvice is up and running:

Jun 09 11:38:10 ano systemd[1]: Starting clamav daemon...
Jun 09 11:38:17 ano systemd[1]: Started clamav daemon.


Additional info:

local/clamav 0.98.7-1
Anti-virus toolkit for Unix

Steps to reproduce:

Reboot.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Saturday, 11 July 2015, 19:21 GMT
Reason for closing:  No response
Comment by Gaetan Bisson (vesath) - Wednesday, 10 June 2015, 20:00 GMT
Please try adding a new line "After=network.target" under "[Unit]" in /usr/lib/systemd/system/clamd.service and see if it solves your issue.

However a virus scanner should not depend on the network being up. Clamd should not need to call getaddrinfo; have you done any change to your clamd configuration on top of the defaults?

At any rate the getaddrinfo call should probably not raise a fatal error if it fails, and this should be reported upstream; could you do that? Thanks.
Comment by Bar Hofesh (bararchy) - Friday, 12 June 2015, 15:21 GMT
Adding the "After" parameter indeed fixed the issue, I didn't do any special changes to the program or daemon file prior to your suggestion.
I'll try and open a ticket on the ClamAV site.
Comment by Gaetan Bisson (vesath) - Friday, 12 June 2015, 23:49 GMT
I'll add After=network.target to our package for now; please paste the link to the upstream ticket here, so we can track it and see what other suggestions are made. Cheers.

Loading...