Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th April 2010, 21:55
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default Spamassassin won't start

I have just updated my spamassassin from 3.0.4-1.el5.rf to 3.3.1-3.el.rf having installed all the required dependencies.
Now when I start spamassassin I get the following message:
Starting spamd: child process [7005] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588.
[FAILED]

I look at /usr/bin/spamd line 2588 and it is:
die sprintf("child process [%s] exited or timed out ".
"without signaling production of a PID file: %s",
$pid, exit_status_str($child_stat,0)) unless $serverstarted;
exit;

I have no idea what to do now.
Can anybody help ???
Reply With Quote
Sponsored Links
  #2  
Old 11th April 2010, 02:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

As far as I understand, no PID file was created. Can you post the contents of the SpamAssassin init script?
__________________
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 11th April 2010, 13:01
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Falko...
Many thanks for taking the time to reply to me.
Here is my /etc/init.d/spamassassin file:

#!/bin/sh
#
# spamassassin This script starts and stops the spamd daemon
#
# chkconfig: - 78 30
# processname: spamd
# description: spamd is a daemon process which uses SpamAssassin to check \
# email messages for SPAM. It is normally called by spamc \
# from a MDA.

# Source function library.
. /etc/rc.d/init.d/functions

prog="spamd"

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Set default spamd configuration.
SPAMDOPTIONS="-d -c -m5 -H"
SPAMD_PID=/var/run/spamd.pid

# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then
. /etc/sysconfig/spamassassin
fi

[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin

# By default it's all good
RETVAL=0

# See how we were called.
case "$1" in
start)
# tell portreserve to release the port
[ -x /sbin/portrelease ] && /sbin/portrelease spamd &>/dev/null || :
# Start daemon.
echo -n $"Starting $prog: "
daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID
RETVAL=$?
echo
if [ $RETVAL = 0 ]; then
touch /var/lock/subsys/spamd
fi
;;
stop)
# Stop daemons.
echo -n $"Stopping $prog: "
killproc spamd
RETVAL=$?
echo
if [ $RETVAL = 0 ]; then
rm -f /var/lock/subsys/spamd
rm -f $SPAMD_PID
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
condrestart)
[ -e /var/lock/subsys/spamd ] && $0 restart
;;
status)
status spamd
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status|condrestart}"
RETVAL=1
;;
esac

exit $RETVAL

I have noticed on line 24: SPAMD_PID=/var/run/spamd.pid

that this does not exist.
Maybe this is the problem but I don't know how to fix it.
Any help will be appreciated.

Thanks,

John C
Reply With Quote
  #4  
Old 12th April 2010, 13:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's the output of
Code:
ls -la /var/run/
? Is SELinux disabled?
__________________
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
  #5  
Old 12th April 2010, 20:36
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

This is the output of /var/run

[root@redvelvet ~]# la /var/run
total 332
drwxr-xr-x 24 root root 4096 Apr 12 19:01 .
drwxr-xr-x 24 root root 4096 Mar 22 19:22 ..
srw-rw-rw- 1 root root 0 Apr 12 11:01 acpid.socket
-rw-r--r-- 1 root root 5 Dec 21 15:51 atd.pid
srw-r----- 1 root root 0 Apr 12 11:01 audispd_events
-rw-r--r-- 1 root root 6 Apr 12 11:01 auditd.pid
prw------- 1 root root 0 Apr 12 11:01 autofs.fifo-misc
prw------- 1 root root 0 Apr 12 11:01 autofs.fifo-net
drwxr-xr-x 2 avahi avahi 4096 Apr 12 11:01 avahi-daemon
drwxr-xr-x 2 root root 4096 Mar 11 17:24 console
-rw-r--r-- 1 root root 5 Apr 9 13:24 crond.pid
drwxr-xr-x 3 root lp 4096 Dec 21 15:51 cups
-rw-r--r-- 1 root root 5 Dec 21 15:51 cupsd.pid
drwxr-xr-x 2 root root 4096 Dec 21 15:51 dbus
-rw-r--r-- 1 root root 5 Dec 21 16:08 dhclient-:1.pid
drwxr-xr-x 3 root dovecot 4096 Dec 21 15:51 dovecot
-rw-r--r-- 1 root root 5 Dec 21 15:51 gpm.pid
-rw-r--r-- 1 root root 5 Dec 21 15:51 haldaemon.pid
-rw-r--r-- 1 root root 5 Apr 11 04:03 httpd.pid
-rw------- 1 root root 5 Dec 21 15:51 klogd.pid
drwxr-xr-x 4 root root 4096 Apr 8 19:42 libvirt
drwx------ 2 root root 4096 May 24 2008 mdadm
drwx------ 2 root root 4096 May 24 2008 mdmpd
-rw-r--r-- 1 root root 5 Dec 21 15:51 messagebus.pid
drwxr-xr-x 2 mysql mysql 4096 Apr 9 13:24 mysqld
drwxrwx--- 2 named named 4096 Jul 30 2009 named
lrwxrwxrwx 1 root root 41 Apr 9 13:24 named.pid -> /var/named/chroot/var/run/named/named.pid
drwxrwxr-x 2 root root 4096 Mar 5 2009 netreport
drwxr-xr-x 2 root root 4096 Apr 8 2009 NetworkManager
drwxr-x--- 2 news news 4096 Feb 26 2009 news
drwxr-xr-x 2 root root 4096 Jan 20 18:34 nscd
srwxrwxrwx 1 root root 0 Dec 21 15:51 pcscd.comm
-rw-r--r-- 1 root root 4 Dec 21 15:51 pcscd.pid
-rw-r--r-- 1 root root 65537 Dec 21 15:51 pcscd.pub
drwxr-xr-x 2 root root 4096 Jan 22 2009 pm
drwxr-xr-x 2 root root 4096 Jan 21 2009 ppp
-rw-r--r-- 1 rpcuser rpcuser 5 Dec 21 15:51 rpc.statd.pid
drwxr-xr-x 2 root root 4096 Mar 17 13:14 saslauthd
srw-rw-rw- 1 root root 0 Dec 21 15:51 sdp
-rw------- 1 root smmsp 32 Apr 9 13:25 sendmail.pid
drwxr-xr-x 2 root root 4096 Jan 21 2009 setrans
-rw-r--r-- 1 smmsp smmsp 49 Apr 9 13:24 sm-client.pid
drwxr-xr-x 2 root root 4096 Mar 22 22:32 spamassassin
-rw-r--r-- 1 root root 6 Apr 8 19:38 sshd.pid
drwx------ 3 root root 4096 Mar 24 2009 sudo
-rw------- 1 root root 5 Dec 21 15:51 syslogd.pid
-rw-rw-r-- 1 root utmp 5376 Apr 12 19:23 utmp
drwxr-xr-x 2 root root 4096 Jul 14 2009 winbindd
drwxr-xr-x 2 root root 4096 Jan 21 2009 wpa_supplicant
-rw-r--r-- 1 root root 6 Dec 21 15:51 xfs.pid
-rw-r--r-- 1 root root 5 Apr 9 13:24 xinetd.pid
[root@redvelvet ~]#

I notice that there is no spand.pid. I think this should be created automatically with service spamassassin start

SELinux IS disabled
I couldn't get anything to run with it enabled.


hope this helps.

John C
Reply With Quote
  #6  
Old 13th April 2010, 16:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Hm, the permissions look ok. Can you run
Code:
spamd
on the command line? Do you get any errors?
__________________
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 13th April 2010, 18:57
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

[root@redvelvet ~]# spamd -D
Apr 13 17:55:02.412 [19839] dbg: logger: adding facilities: all
Apr 13 17:55:02.413 [19839] dbg: logger: logging level is DBG
Apr 13 17:55:02.435 [19839] dbg: logger: calling setlogsock(unix)
Apr 13 17:55:02.436 [19839] dbg: logger: opening syslog with unix socket
Apr 13 17:55:02.437 [19839] dbg: logger: successfully connected to syslog/unix
Apr 13 17:55:02.437 [19839] dbg: logger: successfully added syslog method
Apr 13 17:55:02.439 [19839] dbg: spamd: will perform setuids? 1
Apr 13 17:55:02.441 [19839] dbg: spamd: creating INET socket:
Apr 13 17:55:02.442 [19839] dbg: spamd: [...] Listen: 128
Apr 13 17:55:02.443 [19839] dbg: spamd: [...] LocalAddr: 127.0.0.1
Apr 13 17:55:02.444 [19839] dbg: spamd: [...] LocalPort: 783
Apr 13 17:55:02.445 [19839] dbg: spamd: [...] Proto: 6
Apr 13 17:55:02.446 [19839] dbg: spamd: [...] ReuseAddr: 1
Apr 13 17:55:02.447 [19839] dbg: spamd: [...] Type: 1
Apr 13 17:55:02.450 [19839] dbg: logger: adding facilities: all
Apr 13 17:55:02.452 [19839] dbg: logger: logging level is DBG
Apr 13 17:55:02.453 [19839] dbg: generic: SpamAssassin version 3.3.1
Apr 13 17:55:02.454 [19839] dbg: generic: Perl 5.008008, PREFIX=/usr, DEF_RULES_DIR=/usr/share/spamassassin, LOCAL_RULES_DIR=/etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
Apr 13 17:55:02.455 [19839] dbg: config: timing enabled
Apr 13 17:55:02.458 [19839] dbg: config: score set 0 chosen.
Apr 13 17:55:02.477 [19839] dbg: dns: is Net:NS::Resolver available? yes
Apr 13 17:55:02.478 [19839] dbg: dns: Net:NS version: 0.59
Apr 13 17:55:02.483 [19839] dbg: spamd: Preloading modules with HOME=/tmp/spamd-19839-init
Apr 13 17:55:02.486 [19839] dbg: config: using "/etc/mail/spamassassin" for site rules pre files
Apr 13 17:55:02.488 [19839] dbg: config: read file /etc/mail/spamassassin/init.pre
Apr 13 17:55:02.490 [19839] dbg: config: read file /etc/mail/spamassassin/v310.pre
Apr 13 17:55:02.491 [19839] dbg: config: read file /etc/mail/spamassassin/v312.pre
Apr 13 17:55:02.493 [19839] dbg: config: read file /etc/mail/spamassassin/v320.pre
Apr 13 17:55:02.494 [19839] dbg: config: read file /etc/mail/spamassassin/v330.pre
Apr 13 17:55:02.496 [19839] dbg: config: using "/usr/share/spamassassin" for sys rules pre files
Apr 13 17:55:02.497 [19839] dbg: config: using "/usr/share/spamassassin" for default rules dir
Apr 13 17:55:02.499 [19839] error: config: no rules were found! Do you need to run 'sa-update'?
config: no rules were found! Do you need to run 'sa-update'?
[root@redvelvet ~]# sa-update
channel: no 'mirrors.updates.spamassassin.org' record found, channel failed
[root@redvelvet ~]#

My /etc/resolve file is:

search gvl99.co.uk
#nameserver 88.97.199.147
nameserver 88.97.199.148
nameserver 88.97.199.149
nameserver 212.23.6.100
nameserver 212.23.3.100

These are all genuine name servers.

hth

Last edited by countrydj; 13th April 2010 at 19:01. Reason: To give more information
Reply With Quote
  #8  
Old 2nd May 2010, 19:18
JustPassingBy JustPassingBy is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know how your linux installs, but do you have a file called "MIRRORED.BY" in a location similar to (probably)/var/(maybe)db/spamassassin/[version_number_like_3.002005]/updates_spamassassin_org/

And if so - what's in it?

Code:
root@tobermory# cat /var/db/spamassassin/3.002005/updates_spamassassin_org/MIRRORED.BY
# test mirror: zone, cached via Coral
#http://buildbot.spamassassin.org.nyud.net:8090/updatestage/
http://spamassassin.kluge.net/updates/ weight=5
http://daryl.dostech.ca/sa-update/asf/ weight=5
http://www.sa-update.pccc.com/ weight=1
Reply With Quote
  #9  
Old 3rd May 2010, 01:14
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi JustPassingBy...
Thanks for coming in on this thread. I must admit I'm absolutely lost with this problem

I only have one MIRRORED.BY file and it is located:
/root/.cpan/sources/MIRRORED.BY

It doesn't contain anything at all to do with spamassassin.

I hope that you can come up with some other suggestions that may help me.

I am running CENTOS 5

John C

Last edited by countrydj; 3rd May 2010 at 01:16. Reason: adding more info
Reply With Quote
  #10  
Old 3rd May 2010, 02:29
JustPassingBy JustPassingBy is offline
Junior Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I had the same problem as you, but when I ran sa-update it fixed it. I think sa-updates creates that file, so if it's not doing so then perhaps it could use a helping hand?

Have a look in /var/lib and see if there's a spamassassin dir in there. If there is, create a subdir called "3.003001" and in there create a file called "updates_spamassassin_org.cf" and make it like so:

Code:
root@tobermory# cat updates_spamassassin_org.cf
# UPDATE version 932302
include updates_spamassassin_org/10_default_prefs.cf
include updates_spamassassin_org/20_advance_fee.cf
include updates_spamassassin_org/20_aux_tlds.cf
include updates_spamassassin_org/20_body_tests.cf
include updates_spamassassin_org/20_compensate.cf
include updates_spamassassin_org/20_dnsbl_tests.cf
include updates_spamassassin_org/20_drugs.cf
include updates_spamassassin_org/20_dynrdns.cf
include updates_spamassassin_org/20_fake_helo_tests.cf
include updates_spamassassin_org/20_freemail.cf
include updates_spamassassin_org/20_freemail_domains.cf
include updates_spamassassin_org/20_head_tests.cf
include updates_spamassassin_org/20_html_tests.cf
include updates_spamassassin_org/20_imageinfo.cf
include updates_spamassassin_org/20_meta_tests.cf
include updates_spamassassin_org/20_net_tests.cf
include updates_spamassassin_org/20_phrases.cf
include updates_spamassassin_org/20_porn.cf
include updates_spamassassin_org/20_ratware.cf
include updates_spamassassin_org/20_uri_tests.cf
include updates_spamassassin_org/20_vbounce.cf
include updates_spamassassin_org/23_bayes.cf
include updates_spamassassin_org/25_accessdb.cf
include updates_spamassassin_org/25_antivirus.cf
include updates_spamassassin_org/25_asn.cf
include updates_spamassassin_org/25_dcc.cf
include updates_spamassassin_org/25_dkim.cf
include updates_spamassassin_org/25_hashcash.cf
include updates_spamassassin_org/25_pyzor.cf
include updates_spamassassin_org/25_razor2.cf
include updates_spamassassin_org/25_replace.cf
include updates_spamassassin_org/25_spf.cf
include updates_spamassassin_org/25_textcat.cf
include updates_spamassassin_org/25_uribl.cf
include updates_spamassassin_org/30_text_de.cf
include updates_spamassassin_org/30_text_fr.cf
include updates_spamassassin_org/30_text_it.cf
include updates_spamassassin_org/30_text_nl.cf
include updates_spamassassin_org/30_text_pl.cf
include updates_spamassassin_org/30_text_pt_br.cf
include updates_spamassassin_org/50_scores.cf
include updates_spamassassin_org/60_adsp_override_dkim.cf
include updates_spamassassin_org/60_awl.cf
include updates_spamassassin_org/60_shortcircuit.cf
include updates_spamassassin_org/60_whitelist.cf
include updates_spamassassin_org/60_whitelist_dkim.cf
include updates_spamassassin_org/60_whitelist_spf.cf
include updates_spamassassin_org/60_whitelist_subject.cf
include updates_spamassassin_org/72_active.cf
include updates_spamassassin_org/72_scores.cf
include updates_spamassassin_org/local.cf
include updates_spamassassin_org/regression_tests.cf
In the same dir as that file, create a dir called "updates_spamassassin_org" cd into it and create the file "MIRRORED.BY" as per my previous post.

Then run sa-update and see if it works.

(Warning: you might want to check your sa-updates script for where it expects to find these files as I'm using a completely different UNIX to you, and the dirs in this post are the default linux ones)

If that doesn't work then I'm afraid you could be lost in PERL hell. I despise the PERL way of doing things, I will state for the record right now. What you may have to do is reinstall perl5.whatever and then reinstall every little p5- module that SA requires. Then you can go ahead and reinstall SA.

I suspect it's the LWP::UserAgent module that's hurting you. If you can find a replacement module for it like LWP::UserAgent:etermined then I would recommend it - it does the same thing, only when it fails to connect first time it waits and tries again a few times. It worked for me.

PERL has a nasty trick (at least on the OS I use) of installing all its modules on a per-version basis, so if you installed perl5-8-9 or whatever then updated to perl5-10-1, not one of your single p5- modules will work until you reinstall them for the new PERL version. And when you try and update them, it complains that they are already installed and fails. It drives me to distraction.

Good luck and let us know how you get on.

Last edited by JustPassingBy; 3rd May 2010 at 02:32.
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
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
ISPconfig 2.2.21 Load Averange Very High mmiyamoto General 3 6th March 2008 13:13
"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 03:52.


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