Author Topic: spamassassin.service: Failed with result 'start-limit-hit'  (Read 8353 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
spamassassin.service: Failed with result 'start-limit-hit'
« on: August 01, 2021, 08:46:35 PM »
Hello,
I put this post here, mail section, because although it is from spamassassin, it is the most suitable section that I see.

I have this problem, for a long time, spamassassin only lasts a few hours, the most I have managed to work has been 3 or 4 days in a row.
At the moment that, for whatever reason, it stops working (according to the line of the subject and log that I will put below) I can no longer solve it in any way, if I do a restart, it takes just a few minutes.

I have done many tests, even another vps that I have without use, I have transferred the entirety of this server, so they have exactly the same accounts, same mails ... everything is the same, even both vps are the same (same cores, same ram) except that one is intel, the other epyc (it is the one that fails).
I have even transferred this account to another vps that has 2 accounts and added the server epyc (which are 2 accounts) in total 4, and it does not fail either.

To understand us:
Server1: Epyc (two accounts, is the one that gives me the problems).
Server2: Intel: Not used, I have transferred the whole of server1 and it does not fail.
Server3: Intel: With use of 2 accounts, I have added by transfer the 2 accounts of server1, and this does not fail.

So that they always have the same mails, through rsync I transfer the mails from server1 to server2 and server3.

I have followed the spamassassin installation wiki, also in rebuild from cwp, with Amavis / Clamd and without it.
Always, sooner or later, it ends up failing.

The other difference between server1 and server2 and server3 is that server1 is with php-fpm, the other two are not.

As I comment, same cores, same ram, same s.o. all equal.

I doubt that the cause is because it is an Epyc instead of an Intel ...

This is the log (I put 3 logs).

Code: [Select]
● spamassassin.service - Spamassassin daemon
   Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit-hit) since Thu 2021-07-15 14:00:49 CEST; 6h ago
  Process: 390132 ExecStart=/usr/bin/spamd $SPAMDOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 390132 (code=exited, status=0/SUCCESS)

Jul 15 14:00:49 server.mydomain.com systemd[1]: spamassassin.service: Succeeded.
Jul 15 14:00:49 server.mydomain.com systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Jul 15 14:00:49 server.mydomain.com systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 9444.
Jul 15 14:00:49 server.mydomain.com systemd[1]: Stopped Spamassassin daemon.
Jul 15 14:00:49 server.mydomain.com systemd[1]: spamassassin.service: Start request repeated too quickly.
Jul 15 14:00:49 server.mydomain.com systemd[1]: spamassassin.service: Failed with result 'start-limit-hit'.
Jul 15 14:00:49 server.mydomain.com systemd[1]: Failed to start Spamassassin daemon.




● spamassassin.service - Spamassassin daemon
   Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit-hit) since Sun 2021-08-01 09:02:50 CEST; 1min 33s ago
  Process: 3493 ExecStart=/usr/bin/spamd $SPAMDOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 3493 (code=exited, status=0/SUCCESS)

Aug 01 09:02:50 server.mydomain.com systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Aug 01 09:02:50 server.mydomain.com systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 115.
Aug 01 09:02:50 server.mydomain.com systemd[1]: Stopped Spamassassin daemon.
Aug 01 09:02:50 server.mydomain.com systemd[1]: spamassassin.service: Start request repeated too quickly.
Aug 01 09:02:50 server.mydomain.com systemd[1]: spamassassin.service: Failed with result 'start-limit-hit'.
Aug 01 09:02:50 server.mydomain.com systemd[1]: Failed to start Spamassassin daemon.



● spamassassin.service - Spamassassin daemon
   Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit-hit) since Sun 2021-08-01 20:26:21 CEST; 2h 6min ago
  Process: 57453 ExecStart=/usr/bin/spamd $SPAMDOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 57453 (code=exited, status=0/SUCCESS)

Aug 01 20:26:21 server.mydomain.com systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Aug 01 20:26:21 server.mydomain.com systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 5916.
Aug 01 20:26:21 server.mydomain.com systemd[1]: Stopped Spamassassin daemon.
Aug 01 20:26:21 server.mydomain.com systemd[1]: spamassassin.service: Start request repeated too quickly.
Aug 01 20:26:21 server.mydomain.com systemd[1]: spamassassin.service: Failed with result 'start-limit-hit'.
Aug 01 20:26:21 server.mydomain.com systemd[1]: Failed to start Spamassassin daemon.


If when this happens, I run this statement:
Code: [Select]
systemctl reset-failed spamassassinWorks again for a few hours, then crashes again.

Any ideas?

Thanks in advance.

Offline
**
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #1 on: August 16, 2021, 06:15:24 PM »
Any info about this?
I search a lot for google but...lot info, any concret about fixed this issue....
Regards.

Offline
*
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #2 on: August 29, 2021, 07:17:39 AM »
Hello,

Kindly edit the following file,

Code: [Select]
nano /usr/lib/systemd/system/spamassassin.service
You need to insert
Code: [Select]
StartLimitBurst=0 in the [Service] section of the file at the end.

Now run the following command,

Code: [Select]
systemctl daemon-reload
That's all.


Offline
**
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #3 on: October 25, 2021, 11:39:53 PM »
First of all, sorry for the delay of about 2 months in replying. I read your answer, and I really appreciate it.

However, during this time I have been looking for information by conducting tests ... etc ... and although I could have answered before, I have chosen to answer after having carried out tests and to say forcefully, that the results are positive after a month having implemented the last change / test.

Effectively your answer / solution solves the initial problem that I expose in this thread, even so, it has always surprised me a lot that, spamassassin raises the cpu consumption to 0.90 - 1.00 on average, regardless of the fact that, no matter how much we configure spamassassin such and as the cwp wiki says, also as it supports cwp (I requested support for it) never send any mail to the spam folder ... this was very strange to me.
The answer to this increase in cpu is that perhaps, I would have many emails on my server ...

The tests I have done on 4 servers, I have 3 for testing 1 in production.

Gradually I was eliminating mails from the main test server, and the consumption was always the same ... there came a day that, I eliminated all the accounts of that server, no account, no mail, nothing, the consumption of spamassassin was still the same, I raised the server to 0.90 - 1.00 on average. Something very very high.

Too bad it didn't save the url where I got the information, I did write it down in kate (linux notepad) and I have it saved in my documents. If you have saved the url, you could say the clear terms of the explanation.

Well, the change happens by modifying / etc / sysconfig / spamassassin file:
In wiki they indicate:
Code: [Select]
SPAMDOPTIONS = "- d -c -m5 -u nobody -s $ {SAHOME} spamd.log" But we actually remove the "-d" from the beginning, looking like this:
Code: [Select]
SPAMDOPTIONS = "-c -m5 -u nobody -s $ {SAHOME} spamd.log" If my memory does not fail me (and it is easy for it to fail) this causes spamassassin to be executed as a service (I do not remember exactly if it was a service or another ...) and now it does, spamassassin, without making the changes that you mention in your post and that I had also seen in other internet threads, it is always executed, without any crash and without load on the server, the server load is normal, if you are using apache, then whatever Apache loads or whatever, and during non-use hours, the server load is 0.00 and spamassassin is active.

The reason why, despite this, spamassassin does not filter, does not take the identified emails to the spam folder and does not rename them with *** SPAM *** as indicated in the wiki, is because it should not be configured in / usr / share /spamassassin/local.cf
Rather, it must be configured in another path.

After that, you can test by sending an email with the subject:
"XJS * C4JDBQADN1.NSBN3 * 2IDNEN * GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL * C.34X" (without quotes) and it looks like the mail is put in the spam folder and renamed the subject to *** SPAM ***.

Greetings.

Offline
*
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #4 on: November 22, 2021, 06:56:22 PM »
First of all, sorry for the delay of about 2 months in replying. I read your answer, and I really appreciate it.

However, during this time I have been looking for information by conducting tests ... etc ... and although I could have answered before, I have chosen to answer after having carried out tests and to say forcefully, that the results are positive after a month having implemented the last change / test.

Effectively your answer / solution solves the initial problem that I expose in this thread, even so, it has always surprised me a lot that, spamassassin raises the cpu consumption to 0.90 - 1.00 on average, regardless of the fact that, no matter how much we configure spamassassin such and as the cwp wiki says, also as it supports cwp (I requested support for it) never send any mail to the spam folder ... this was very strange to me.
The answer to this increase in cpu is that perhaps, I would have many emails on my server ...

The tests I have done on 4 servers, I have 3 for testing 1 in production.

Gradually I was eliminating mails from the main test server, and the consumption was always the same ... there came a day that, I eliminated all the accounts of that server, no account, no mail, nothing, the consumption of spamassassin was still the same, I raised the server to 0.90 - 1.00 on average. Something very very high.

Too bad it didn't save the url where I got the information, I did write it down in kate (linux notepad) and I have it saved in my documents. If you have saved the url, you could say the clear terms of the explanation.

Well, the change happens by modifying / etc / sysconfig / spamassassin file:
In wiki they indicate:
Code: [Select]
SPAMDOPTIONS = "- d -c -m5 -u nobody -s $ {SAHOME} spamd.log" But we actually remove the "-d" from the beginning, looking like this:
Code: [Select]
SPAMDOPTIONS = "-c -m5 -u nobody -s $ {SAHOME} spamd.log" If my memory does not fail me (and it is easy for it to fail) this causes spamassassin to be executed as a service (I do not remember exactly if it was a service or another ...) and now it does, spamassassin, without making the changes that you mention in your post and that I had also seen in other internet threads, it is always executed, without any crash and without load on the server, the server load is normal, if you are using apache, then whatever Apache loads or whatever, and during non-use hours, the server load is 0.00 and spamassassin is active.

The reason why, despite this, spamassassin does not filter, does not take the identified emails to the spam folder and does not rename them with *** SPAM *** as indicated in the wiki, is because it should not be configured in / usr / share /spamassassin/local.cf
Rather, it must be configured in another path.

After that, you can test by sending an email with the subject:
"XJS * C4JDBQADN1.NSBN3 * 2IDNEN * GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL * C.34X" (without quotes) and it looks like the mail is put in the spam folder and renamed the subject to *** SPAM ***.

Greetings.

Thank you very much. It works for me! 💐

Offline
**
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #5 on: December 29, 2021, 08:04:47 PM »
Thank you very much. It works for me! 💐
Sorry for the delay in answering.
The email notification went to the spam folder ...

Glad that worked for you and was helpful, remember, the spamassasin local.cf is not set in / usr / share / spamassassin.

It must be in another route, in this way, doing the aforementioned test of sending an email with the indicated subject, it goes to the spam folder and from there, the ones that it identifies as spam are renamed.

Offline
*
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #6 on: January 29, 2023, 02:16:30 AM »
The reason why, despite this, spamassassin does not filter, does not take the identified emails to the spam folder and does not rename them with *** SPAM *** as indicated in the wiki, is because it should not be configured in / usr / share /spamassassin/local.cf
Rather, it must be configured in another path.

Hello, I hope you are well.
I also can't mark it as spam even following the wiki. Could you let me know where it is configured to mark as spam, as it is not in :
/ usr / share /spamassassin/local.cf

Offline
*****
Re: spamassassin.service: Failed with result 'start-limit-hit'
« Reply #7 on: January 29, 2023, 12:52:38 PM »
The -d option for spamassassin is for "daemonize" or, run as a background service.

If you edit the /etc/sysconfig/spamassassin file according to the wiki, you will want to do your main configuration changes to:
/etc/spamassassin/local.cf

A few directives to get it working:
Code: [Select]
rewrite_header Subject *SPAM*
report_safe 0
required_score  5.0
required_hits   5.0
use_bayes 1
bayes_auto_learn 1
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status

If you do want to use the additional configuration in /usr/share/spamassasin, you will also have to add this directive in your /etc/spamassassin/local.cf main config file:
Code: [Select]
include /usr/share/spamassassin/