Failed to read PID from file /var/run/MailScanner.pid: Invalid argument
Mark Sapiro
mark at msapiro.net
Sun Oct 23 22:13:15 UTC 2016
On 10/22/2016 03:23 AM, Walt Thiessen wrote:
> We had an incident where MailScanner mysteriously stopped running
> yesterday, and we had to restart it.
>
> The only thing my admins could find in the logs to give us any clue as
> to why it stopped was this entry:
>
> Oct 21 23:07:45 server systemd: Failed to read PID from file
> /var/run/MailScanner.pid: Invalid argument
What were the MailScanner entries in the mail.log leading up to the time
it stopped?
> The file at /var/run/MailScanner.pid merely contains a number: 26969,
> and nothing else.
That seems correct. If MailScanner is running, the file should contain
just a single line with the PIP of the running MailScanner master
process. If MailScanner is not running there should be no file.
> Does anyone know the purpose of that /var/run/MailScanner.pid and why it
> might generate such an error?
The file is written by MailScanner when it starts to record the PID of
the running MailScanner. The /etc/init.d/ script that starts and stops
MailScanner uses that info and also may remove the file when stopping
MailScanner. Exactly what this script does depends on your Mailscanner
version. There are significant changes in version 5.
Normally, systemd issues that error when the file doesn't exist or
doesn't contain just a PID. However, systemd would normally only be
reading that file if some script in /etc/init, /etc/init.d or
/etc/systemd that referenced it was run in response to some systemctl or
service command.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the MailScanner
mailing list