chkservd will not find spamd service, keeps restarting

afrazee

Member
Jun 18, 2003
10
0
151
I have searched through the forums here and tried rm'ing /var/run/chkservd/spamd and restarting chkservd, with no luck. I have spoken with my host provider tech and this is the information he has told me:

"I have confirmed that spamd is running just fine. The problem exists in chkservd and how it's checking to make sure spamd is running. It runs spamc (spam client) and sends a fake message to spamd. If it does not respond before the timeout then it reports it as not running. The timeout is set to 600 seconds which seems to be a more than reasonable time for the message to go through. I manually ran the command that cpanel uses to check the timeout of spamd and it worked just fine with no timeout.

I can't make any kind of modification to the cpanel software because it's proprietary. I would strongly suggest posting a message on the cPanel support forums asking what can be done to remedy this. Outside of that I'm afraid I can't be of much more help with this problem."
 

afrazee

Member
Jun 18, 2003
10
0
151
No, it has not, im working with cPanel support currently and we are addressing the problem. At first it was fixed by re-installing SpamAssassin, but it has started again, I'm still waiting for a fix...
 

afrazee

Member
Jun 18, 2003
10
0
151
Just an update...

I was looking on the internet and I found this link. Which i believe tells me that if i run
Code:
/scripts/restartsrv_spamd --check
and receive no output then it will place a '+' inside /var/run/chkservd/spamd

However when i type:
Code:
/scripts/restartsrv_spamd --check
I receive:
Code:
[email protected] [/]# /scripts/restartsrv_spamd --check
Spamd is not running
[email protected] [/]#
which tells me why there is a '-' in my /var/run/chkservd/spamd

Now i am not sure how to troubleshoot this problem, i do have a strace output of the /scripts/restartsrv_spamd --check command, will this be helpful for someone? I have not got a clue, i can put the strace output of it would be beneficial. Other than that I have to wait until cPanel Support can get back to me..
 

afrazee

Member
Jun 18, 2003
10
0
151
OK I think i figured out why this is not working, to begin with, let me say that i used this guide. Just playing around i went thru it again making sure i did it correctly. Well what i have found is down at this part:

* Testing message scores at the different threshold

Change the GTUBE scores in server-wide Spamassassin configuration.

pico /etc/mail/spamassassin/local.cf

Add this:

# Change the number to the score you want to test
score GTUBE 13
#score GTUBE 11
#score GTUBE 6

Restart Exim

/etc/rc.d/init.d/exim restart

Email yourself GTUBE code, and watch the log.
Well inside my /etc/mail/spamassassin/local.cf i did have:
score GTUBE 13 uncommented, i went thru and tried each of them seperately, restarted exim, then used the command /scripts/restartsrv_spamd --check to see if i got an output, well i figured out the only way i can have no output was to comment them all out so it looks like this:

Code:
# Change the number to the score you want to test
#score GTUBE 13
#score GTUBE 11
#score GTUBE 6
Does this affect anything else? i havent got a clue, i just know this is working for me, if someone could please explain why this is happening, i understand that restartsrv_spamd --check uses /scripts/RestartSrv.pm to send a fake email to test the system filter and somehow that score GTUBE 13 line was making it timeout creating an output of spamd not running.
 

rvskin

Well-Known Member
PartnerNOC
Feb 19, 2003
399
1
168
GTUBE code is a special rule used for testing spamassassin. After tweak spamassassin and test it. You should remove the GTUBE rewrite score in /etc/mail/spamassassin/local.cf.

However I check /scripts/restartsrv_spamd and /scripts/RestartSrv.pm, rewrite GTUBE score should not create any problem with checkservd. You can check if spamd is running by using this command.

/scripts/restartsrv_spamd --status

Noted: no space between -- and status.
 

afrazee

Member
Jun 18, 2003
10
0
151
when i use
/scripts/restartsrv_spamd --status i see the processes just fine, the problem lies in how chksrvd checks to see how spamd is running or not. It uses/scripts/RestartSrv.pm to send a test email and the way it does this is with the /scripts/restartsrv_spamd --check and not --status and by commenting out score GTUBE 13 was the only way it worked.
 

rfrench10

Well-Known Member
Feb 19, 2004
57
0
156
New York
Spamd fails exactly 43 minutes after restarting (every time!)

Spamd fails exactly 43 minutes after restarting (every time!)

I kept getting email notifications (to my cell phone) every 43 minutes around the clock. This got so frustrating that I ended up stopping it and making sure it was not checked for again.

I need spamassassin but can't take these notifications all the time. Is there a solution. I won't disable the system email notications as that is how I keep track of the servers condition.
 

afrazee

Member
Jun 18, 2003
10
0
151
rfrench10 said:
Spamd fails exactly 43 minutes after restarting (every time!)

I kept getting email notifications (to my cell phone) every 43 minutes around the clock. This got so frustrating that I ended up stopping it and making sure it was not checked for again.

I need spamassassin but can't take these notifications all the time. Is there a solution. I won't disable the system email notications as that is how I keep track of the servers condition.
if you type:
Code:
/scripts/restartsrv_spamd --check
is there any output?
 

rfrench10

Well-Known Member
Feb 19, 2004
57
0
156
New York
Yes I tried all four spots you mentioned FIRST, before writing. I do not currently have spamAssassin running and spamd is not running, nor is it failing (obviously) and is it no longer sending the emails (obviously).

My problem is I want to run SpamAssassin and spamd on my server but can't deal with the constant failures and resulting emails, every 43 minutes.
 

afrazee

Member
Jun 18, 2003
10
0
151
rfrench10 said:
Yes I tried all four spots you mentioned FIRST, before writing. I do not currently have spamAssassin running and spamd is not running, nor is it failing (obviously) and is it no longer sending the emails (obviously).

My problem is I want to run SpamAssassin and spamd on my server but can't deal with the constant failures and resulting emails, every 43 minutes.
Well im trying to help, i can only go over the things that i know to check, i myself get many emails, be lucky it was every 43 minutes instead of my 5 minutes. Perhaps it is the same problem, try to enable spamd and try the restartsrv_spamd --check because if it does output anything its obviously going to stick a '-' in /var/run/chkservd/spamd which results in chkservd thinking its down so therefor it will contact you how you specified in whm i would imagine..
 

VexT

Active Member
Nov 15, 2003
34
0
156
I had an issue like this. I had to open port 783 in APF. grep that port # in /var/log/exim_panic_log to see if have any failures with that port
 

zgpablo

Registered
Jul 5, 2005
1
0
151
Eaxactly same issue, but no GTUBE entries in local.cf

I am having the same original issue of getting an email sent in my logs every 8 minutes & 20 seconds. Which is every time chkservd is running to check my processes.

It is obviously doing a "/scripts/restartsrv_spamd --check" which gets no output and decides spamd is down, restarting it and sending the initial test email.

/scripts/restartsrv_spamd --status does get output and if there is a way to use that command instead I am sue it would fix the chkservd issue. Or maybe WHM should fix this bug.

Anyone else having this issue now and got any solutions?