Bug 702815

Summary: clamav-server fails to start Fedora 15
Product: [Fedora] Fedora Reporter: Frank Murphy <frankly3d>
Component: clamavAssignee: Enrico Scholz <rh-bugzilla>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: ADent123, nb, ondrejj, redhat-bugzilla, rh-bugzilla, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-14 00:33:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Clamd installer and setup none

Description Frank Murphy 2011-05-07 11:34:39 UTC
Created attachment 497517 [details]
Clamd installer and setup

Description of problem: Fails to Start


Version-Release number of selected component (if applicable):
rpm -qa | grep clamav
clamav-0.97-1501.fc15.i686
clamav-data-empty-0.97-1501.fc15.noarch
clamav-filesystem-0.97-1501.fc15.noarch
clamav-server-sysvinit-0.97-1501.fc15.noarch
clamav-server-0.97-1501.fc15.i686
clamav-update-0.97-1501.fc15.i686
clamav-lib-0.97-1501.fc15.i686


How reproducible: Always falis on systemd bootup


Steps to Reproduce:
1. install using configure-clamd.sh (attached)
2.
3.
  
Actual results: 

from boot.log:
Starting SYSV: The clamd server running for clamav [1;31mfailed[0m, see 'systemctl status clamd.clamav.service' for details.

 sudo systemctl status clamd.clamav.service
clamd.clamav.service - SYSV: The clamd server running for clamav
	  Loaded: loaded (/etc/rc.d/init.d/clamd.clamav)
	  Active: failed since Sat, 07 May 2011 12:16:32 +0100; 51s ago
	 Process: 2228 ExecStart=/etc/rc.d/init.d/clamd.clamav start (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/clamd.clamav.service
		  └ 1673 clamd.clamav -c /etc/clamd.d/clamav.conf --pid /var/run/clamd.clamav/clamd.pid


Expected results: working clamd server


Additional info:

Comment 1 Arthur Dent 2011-07-20 15:03:44 UTC
I think the reason for this is the fact that the init script that starts clamd tries to create a PID file in /var/run/clamd.clamd/

/var/run/ is now tempfs and is thus wiped clean at reboot so the directory does not exist and the script fails.

I have reported this as bug 723544.

In the meantime I have (temporarily) solved the problem by modifying the clamd-wrapper script as follows:

In the definitions section:
CLAMD_PIDDIR=/var/run/clamd.${CLAMD_SERVICE}

and in the "start" stanza:

 if [ ! -d $CLAMD_PIDDIR ] ; then
         mkdir $CLAMD_PIDDIR && chown clamd:clamd $CLAMD_PIDDIR
      fi

This was with the help of Gene on the Fedora list. See:
http://lists.fedoraproject.org/pipermail/users/2011-July/402001.html

Comment 2 Nick Bebout 2011-08-14 00:33:30 UTC

*** This bug has been marked as a duplicate of bug 723544 ***