amavisd fails to start on reboot, but no problems starting manually [SOLVED]

Tom Hendrikx tom at whyscream.net
Tue Apr 16 09:19:16 CEST 2013


On 04/16/2013 03:25 AM, Ryan de Laplante (personal) wrote:
> I enabled the amavis.log instead of using syslog and then rebooted. 
> Same issue: just dtwo lines in the log file.  Next I tried to manually
> start amavis and got an error message:
> 
>> # /etc/init.d/amavis start
>> Starting amavisd: hostname: Name or service not known
>>   The value of variable $myhostname is "", but should have been
>>   a fully qualified domain name; perhaps uname(3) did not provide such.
>>   You must explicitly assign a FQDN of this host to variable $myhostname
>>   in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a
>> host's
>>   network name!
>> (failed).
> 
> When I run uname -a I can see the FQDN, so that is a little puzzling.  I
> followed the instructions in the error message (setting $myhostname
> manually in 05-node_id) and then tried starting it again.  This time it
> worked.
> 
> Next I rebooted and amavisd started properly on its own!
> 

Sounds like the machine receives the hostname and/or domain settings
from the network (f.i. dhcp), and this isn't available directly after
boot. Maybe everything would start working out of the box when you'd
configure amavisd to start after dhcp and dns services.

> 
> Thanks,
> Ryan
> 
> 
> On 2013-04-14 4:44 AM, Jernej Porenta wrote:
>> Heya,
>>
>> Maybe the problem is that network interfaces are not up at the time of
>> amavis startup. Check the order of startup of your services.
>>
>> Also you might want to try setting the log file instead of using
>> syslog, which will then show why your amavis is not starting up
>> properly during boot time.
>>
>> cheers, J.
>>
>>
>>
>> On 4/13/13 10:18 PM, Ryan de Laplante (personal) wrote:
>>> I have a Debian 6 server running a bunch of LXC containers.  Two of the
>>> containers are mail servers running
>>> postfix/dovecot/amavisd-new/spamassasin/clamav, and both work well. When
>>> I reboot the host machine, amavis starts in both LXC containers but one
>>> of them doesn't start completely and doesn't stay running.
>>>
>>> This is ALL there is to see related to amavis in /var/log/mail.log after
>>> being rebooted:
>>>
>>> Apr 13 16:03:29 mail amavis[267]: starting. /usr/sbin/amavisd-new at
>>> amavisd-new-2.6.4 (20090625), Unicode aware
>>> Apr 13 16:03:29 mail amavis[267]: Perl version 5.010001
>>>
>>> There is nothing about amavis in /var/log/mail.err or /var/log/mail.warn
>>>
>>> When I "ps aux | grep amavis", I can see that it is not running.
>>>
>>> Next I run "/etc/init.d/amavis start" and can see it start up:
>>>
>>> Apr 13 16:06:51 mail amavis[1377]: starting. /usr/sbin/amavisd-new at
>>> mail.mydomain.com amavisd-new-2.6.4 (20090625), Unicode aware,
>>> LANG="en_US"
>>> Apr 13 16:06:51 mail amavis[1377]: Perl version 5.010001
>>> Apr 13 16:06:54 mail amavis[1384]: Net::Server: Group Not Defined.
>>> Defaulting to EGID '109 109'
>>> Apr 13 16:06:54 mail amavis[1384]: Net::Server: User Not Defined.
>>> Defaulting to EUID '106'
>>> Apr 13 16:06:54 mail amavis[1384]: Module Amavis::Conf 2.207
>>> Apr 13 16:06:54 mail amavis[1384]: Module Archive::Zip 1.30
>>> Apr 13 16:06:54 mail amavis[1384]: Module BerkeleyDB 0.42
>>> Apr 13 16:06:54 mail amavis[1384]: Module Compress::Zlib 2.02
>>> ...
>>>
>>> Notice the first line looks different than when it starts automatically
>>> on server restart.   Once it's started, everything works perfectly.
>>>
>>> My other LXC container does not have this problem. Amavisd-new starts on
>>> reboot and works fine.   I've tried to find out what's different between
>>> the two servers but have no idea.  Can someone please help?
>>>
>>> FYI the server reports Perl is version 5.10.1
>>>
>>> Thanks,
>>> Ryan
>>
>>
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130416/5a931806/attachment.sig>


More information about the amavis-users mailing list