Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd October 2011, 08:08
carlos1014 carlos1014 is offline
Junior Member
 
Join Date: Apr 2009
Location: U.S.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Issues with amavisd-new: won't start

Hello, I am using FC15 and following the tutorial for setting up Postfix. I have run into a bit of a dilemma and I have been searching all over the place to try to find an answer. Sorry for the lengthy post, but I figured I'd tell my tale so that everyone can see where I've been; this way I won't be told to go there again.

I installed amavisd-new and clamav as per Page 4 of the tutorial. I changed the settings in amavisd.conf as instructed (entering my correct server information, of course).

When I entered the command to start amavisd, I was presented with the following error:
Code:
Starting amavisd (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]
I noticed it did not give me a log to check. So I went to /var/log and looked at the messages log, where I got this
Code:
Oct  2 00:35:14 server systemd[1]: amavisd.service: control process exited, code=exited status=255
Oct  2 00:35:14 server systemd[1]: Unit amavisd.service entered failed state.
I searched for the above error string, only to be sent to articles about what status 255 means and not answering my question. The Force guided me to run

Code:
# cd /etc/init.d
# amavisd
(note the absence of 'start')

At first it told me that the file /etc/amavisd.conf did not exist and that the script was failing at line 1795 in /usr/bin/amavisd. So, I went to edit said script file, only to find that the variable was set by another file (or at least it appeared to be. Searching for $config_file only sent me on an endless circle with nowhere to set the file path to the conf file). So, I created a symbolic link to point to /etc/amavisd/amavisd.conf; I then ran the amavisd command above again.

Apparently $myhostname needed to be a FQDN and did not like my machine's name, which was simply 'server.' Funny, I don't remember that being in the tutorial. I should probably add that I've followed similar tutorials for the previous versions of Fedora and never had amavisd give me this problem. Anyway, I did as requested by amavis: I uncommented the line and entered a FQDN in $myhostname and commanded Fedora to start the flippin' program:

Code:
# /etc/rc.d/init.d/amavisd start
I about threw the screen out the window when the error message about it failing came up again, but this time the code was 102. However, I remembered my Jedi training and did not give in to the Dark Side. So, I went and looked in the messages log... No new error entry there... I looked in maillog, and behold! Amavis created the BDB in /var/spool/amavisd, and all other kinds of activities (PERL modules loading)... But wait, Fedora told me the process failed, so how is this happening?

Code:
# service amavisd status
amavisd.service - SYSV: amavisd is an interface between MTA and content checkers
	  Loaded: loaded (/etc/rc.d/init.d/amavisd)
	  Active: failed since Sun, 02 Oct 2011 00:44:00 -0400; 8min ago
	 Process: 32438 ExecStart=/etc/rc.d/init.d/amavisd start (code=exited, status=102)
	  CGroup: name=systemd:/system/amavisd.service
# cd /etc/init.d
# amavisd
The amavisd daemon is already running, PID: [32355]
So now I am really confused! How can I have a PID (in essence, it's running) yet the process failed? To make sure SELinux wasn't giving me any issues, I set it to permissive mode, stopped amavis and started it again. I was given the same failed messages in the beginning and amavis wouldn't start...

At this point, if I again process

Code:
# cd /etc/init.d
# amavisd
I get:
Code:
The amavisd daemon is already running, PID: [32355]

So, here is where I am now... can anyone please shed some light on this. Did I miss a setting somewhere?
Reply With Quote
Sponsored Links
  #2  
Old 3rd October 2011, 08:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

To which tutorial (URL) are you referring?

Have you tried to delete the PID file manually and restart amavisd?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd October 2011, 21:08
carlos1014 carlos1014 is offline
Junior Member
 
Join Date: Apr 2009
Location: U.S.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.howtoforge.com/virtual-us...dora-15-x86_64

I wasn't expecting that to work, but it did... Thanks, falko! You da man!
Reply With Quote
  #4  
Old 22nd February 2012, 02:00
Amicus Amicus is offline
Junior Member
 
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default The same issue

I have no pid file anywhere on my system and amavisd still will not start. I even nulled the amavisd.conf file and re-copied the complete contents from the howto. Still no go.
It's not your fault Falko, but I really hate error messages that give you no clue where to look. Here they are as such:
===============================================
[root@www ~]# service amavisd status
amavisd.service - SYSV: amavisd is an interface between MTA and content checkers
Loaded: loaded (/etc/rc.d/init.d/amavisd)
Active: failed since Tue, 21 Feb 2012 18:44:06 -0600; 11min ago
Process: 19117 ExecStart=/etc/rc.d/init.d/amavisd start (code=exited, status=255)
Main PID: 2309 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/amavisd.service
-------------------------------------------------------------
Feb 21 18:35:34 www systemd[1]: amavisd.service: control process exited, code=exited status=255
Feb 21 18:35:34 www systemd[1]: Unit amavisd.service entered failed state.
Feb 21 18:44:06 www systemd[1]: amavisd.service: control process exited, code=exited status=255
Feb 21 18:44:06 www systemd[1]: Unit amavisd.service entered failed state.
-------------------------------------------------------------
Feb 21 18:44:06 www amavis[19121]: starting. /usr/sbin/amavisd at www.example.com amavisd-new-2.6.6 (20110518), Unicode aware, LANG="en_US.UTF-8"
Feb 21 18:44:06 www amavis[19121]: Perl version 5.012004
===============================================
Thank in advance,
Will
Reply With Quote
  #5  
Old 22nd February 2012, 06:13
Amicus Amicus is offline
Junior Member
 
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Further trial and error testing has indicated the following line in amavisd.conf is causing it not to start:

@lookup_sql_dsn =
( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306' , 'mail_admin, 'Mail_Admin_Password'] );

When I remark it out Amavisd starts.

I tried reinstalling the Perl DBI stuff but it didn't help. I've tested the MySQL database connection and it works. All I know now is tomorrow I'll have a lot of users mad at me. <Grin>
Reply With Quote
  #6  
Old 22nd February 2012, 19:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Is MySQL using TCP and listening on port 3306? You can check with
Code:
netstat -tap
Also make sure you use the correct MySQL login in your amavisd configuration.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 22nd February 2012, 19:43
Amicus Amicus is offline
Junior Member
 
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes. It is using 3306.

Could it be an issue with systemd?

I also re-entered the login user and password after verifying they work using mysql login.

Last edited by Amicus; 22nd February 2012 at 19:57.
Reply With Quote
  #8  
Old 23rd February 2012, 06:41
Amicus Amicus is offline
Junior Member
 
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I had to do a force rebuild of Perl modules Bundle::Mysql to get it to work. It was some version problem with two versions of DBD::mysql on my system. It wouldn't allow mysql.so to start. Thanks anyway.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
monitrc configuration for Debian ISPConfig 3 server Hans Tips/Tricks/Mods 2 27th March 2011 23:22
The Perfect Server - Ubuntu 10.10 [ISPConfig 3] artifact66 Installation/Configuration 3 14th March 2011 13:06
Monitoring server Ubuntu wiss Installation/Configuration 7 20th November 2010 12:56
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
"Too many open files in system" problems Berry Installation/Configuration 3 10th November 2007 21:58


All times are GMT +2. The time now is 04:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.