Bug 863069

Summary: amavisd.service fails to start because required default folders are missing
Product: [Fedora] Fedora Reporter: Matt Kinni <matt>
Component: amavisd-newAssignee: Steven Pritchard <steve>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: perl-devel, steve, trailtotale, vanmeeuwen+fedora, vg.aetera
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 991233 (view as bug list) Environment:
Last Closed: 2013-08-01 11:02:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matt Kinni 2012-10-04 11:42:10 UTC
Description of problem:
There are some default folder locations specified in the config file that don't get created when amavisd-new is installed.  The program fails to start because of it.

For example, this message gets printed to the log file when trying to start the service:
amavis[5461]: (!)Net::Server: 2012/10/04-04:35:06 Couldn't open pid file "/var/run/amavisd/amavisd.pid" [No such file or directory].\n\n  at line 318 in fil...Net/Server.pm

In order to make amavisd.service start correctly, I had to do the following:
mkdir /var/spool/amavisd/var
mkdir /var/run/amavisd/
chown -R amavis:amavis /var/spool/amavisd/var
chmod 700 /var/spool/amavisd/var
chown -R amavis:amavis /var/run/amavisd/

After that, everything worked as expected.

Version-Release number of selected component (if applicable):
amavisd-new-2.6.6-2.fc17.noarch

How reproducible:
Always

Steps to Reproduce:
1. yum install amavisd-new
2. systemctl start amavisd.service
3.
  
Actual results:
Fails to start

Expected results:
Starts using default config file

Additional info:

Comment 1 John Florian 2012-10-16 00:23:35 UTC
I have nearly same problem.  My install also failed to start due to the missing /var/run/amavisd directory.  I did not have a/var/spool/amavisd/var directory after the install, but the service started just fine without it.

I've not looked into this package's spec file, but this is rather strange.  Immediately after fresh install of amavisd-new-2.6.6-2.fc17.noarch:

# rpm -V amavisd-new
#

Package verification returned nothing, so it's a clean install.

# rpm -ql amavisd-new  | grep run
/var/run/amavisd
/var/run/clamd.amavisd
#

It would appear that /var/run/amavisd is provided by the package, yet:

# ll /var/run/amavisd
/bin/ls: cannot access /var/run/amavisd: No such file or directory
#

Comment 2 John Florian 2013-02-01 00:53:11 UTC
Having just looked at the spec for amavisd-new-2.8.0-2.fc18.src.rpm, it appears that the problem with the missing /var/run/amavisd/ is because the spec file only makes that directory for the amavisd-new-snmp package.  If you use amavisd-new (the non-snmp variant), you have to make this directory yourself, which is wrong.

Comment 3 Vladislav Grigoryev 2013-03-17 13:47:41 UTC
Confirm, amavisd-new-2.8.0-2.fc18.noarch

Workaround:
mkdir /run/amavisd
restorecon -R -v /run/amavisd 
chown amavis:amavis /run/amavisd

This bug continues from fedora-16. =(

Comment 4 Fedora End Of Life 2013-07-04 03:28:27 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 John Florian 2013-07-11 00:02:39 UTC
Things are looking much better with Fedora 19 (amavisd-new-2.8.0-5.fc19), however I noticed that /var/run/amavisd is not present immediately after installing the package.  Once I rebooted the host, the directory became available.  To me this suggests that the entry /etc/tmpfiles.d/amavisd-new.conf is doing its job, but the spec file for this package needs to also mkdir /var/run/amavisd.  (I learned this the hard way with my own rpm's too: you gotta have both; one for now and the other for after rebooting.)

Comment 6 Fedora End Of Life 2013-08-01 11:02:54 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.