Page 1 of 1

MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 14:59
by jameswang
Hello,

Our mailscanner server all of sudden stopped processing incoming and outgoing emails. I checked maillog and saw:

Code: Select all

Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailScanner Email Processor version 5.1.3 starting...
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Reading configuration file /etc/MailScanner/MailScanner.conf
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Reading configuration file /etc/MailScanner/conf.d/README
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Read 1499 hostnames from the phishing whitelist
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Read 27260 hostnames from the phishing blacklists
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Config: calling custom init function SQLBlacklist
Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailWatch: Starting up MailWatch SQL Blacklist
Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailWatch: Read 1791 blacklist entries
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Config: calling custom init function MailWatchLogging
Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailWatch: Started MailWatch SQL Logging child
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Config: calling custom init function SQLWhitelist
Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailWatch: Starting up MailWatch SQL Whitelist
Oct  9 09:51:27 smtpin2 MailScanner[18813]: MailWatch: Read 504 whitelist entries
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Using SpamAssassin results cache
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Connected to SpamAssassin cache database
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Enabling SpamAssassin auto-whitelist functionality...
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Connected to Processing Attempts Database
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Found 60 messages in the Processing Attempts Database
Oct  9 09:51:27 smtpin2 MailScanner[18813]: Using locktype = flock
Server message log shows:

Code: Select all

Oct  9 09:51:25 smtpin2 MailScanner: Process did not exit cleanly, returned 2 with signal 0
Oct  9 09:51:27 smtpin2 MailScanner: Process did not exit cleanly, returned 2 with signal 0
Oct  9 09:51:29 smtpin2 MailScanner: Process did not exit cleanly, returned 2 with signal 0
Oct  9 09:51:31 smtpin2 MailScanner: Process did not exit cleanly, returned 2 with signal 0
ps command shows many defunct MailScanner processes.

Code: Select all

1 Z postfix   1798  2928  3  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1803  2928  3  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1809  2928  4  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1814  2928  4  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1819  2928  5  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1824  2928  7  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1829  2928  9  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1837  2928 14  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
1 Z postfix   1842  2928 28  80   0 -     0 do_exi 09:58 ?        00:00:00 [MailScanner: wa] <defunct>
Here are the software versions:

Code: Select all

MailWatch Version: 1.2.10
Operating System Version: CentOS Linux 7.9 (Core)
Postfix Version: 3.8.1
MailScanner Version: 5.1.3
ClamAV Version: 0.103.10
SpamAssassin Version: 3.4.0
PHP Version: 7.4.33
MySQL Version: 10.3.39-MariaDB
I have tried 'yum update', deleted /var/spool/Mailscanner/incoming/Processing.db and restarted mailscanner but none helped.

I would greatly appreciate if someone can point me to the right direction.

Thank you.

James Wang

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 16:02
by Sarah
Try going through the suggestions in this knowledgebase article:
https://support.configserver.com/knowle ... at-do-i-do

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 16:56
by jameswang
Sarah wrote: 09 Oct 2023, 16:02 Try going through the suggestions in this knowledgebase article:
https://support.configserver.com/knowle ... at-do-i-do
Thanks Sarah. Going through it now...

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 17:14
by jameswang
Sarah wrote: 09 Oct 2023, 16:02 Try going through the suggestions in this knowledgebase article:
https://support.configserver.com/knowle ... at-do-i-do
Hi Sarah,

Thank you for helping me. I ran MailScanner --debug and got followings:

Code: Select all

MailScanner --debug
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = (unset),
        LANG = "en.US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


In Debugging mode, not forking...
Trying to setlogsock(unix)
Use of uninitialized value $filename in concatenation (.) or string at /usr/local/share/perl5/Mail/SpamAssassin.pm line 1248.
Use of uninitialized value $filename in concatenation (.) or string at /usr/local/share/perl5/Mail/SpamAssassin.pm line 1250.
Building a message batch to scan...
UTF-32:Unrecognised BOM 48 at /usr/local/share/perl5/MIME/WordDecoder.pm line 616.
I followed all the suggestions (except the upgrade part) and mailscanner is still broken.

Any more suggestions?

Thanks,

James

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 17:28
by Sarah
Does the WHM MSFE show you are running the latest version of everything? Is this a cPanel server? I have a feeling it is a very old install because of the mention of the Processing Attempts database, which we disabled ages ago. You may need to uninstall and reinstall MailScanner and MSFE. There are articles for each in the knowledgebase. If you'd like more help, please log a ticket on the helpdesk:
https://support.configserver.com/

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 17:34
by jameswang
Sarah wrote: 09 Oct 2023, 17:28 Does the WHM MSFE show you are running the latest version of everything? Is this a cPanel server? I have a feeling it is a very old install because of the mention of the Processing Attempts database, which we disabled ages ago. You may need to uninstall and reinstall MailScanner and MSFE. There are articles for each in the knowledgebase. If you'd like more help, please log a ticket on the helpdesk:
https://support.configserver.com/
Hi Sarah,

I did upgrade to the latest version and everything works now.

Thank you so much for your help!

James

Re: MailScanner: Process did not exit cleanly, returned 2 with signal 0

Posted: 09 Oct 2023, 17:51
by Sarah
Glad you were able to get it working!

Regards,
Sarah