Topic: newsyslog: can't notify daemon
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: FreeBSD 11.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
For the past two weeks, I've been getting an automated e-mail sent to the root user from the cron daemon at 7:00pm every day with the message:
newsyslog: can't notify daemon, pid 94751 = /var/run/php-fpm.pid: No such process
The server had been running normally for several months before this with no issues.
To troubleshoot, I've run 'pgrep php-fpm' which lists this:
root@mx:~ # pgrep php-fpm
13033
96069
94756
94755
94754
94753
94752
Note, 94751 isn't in the list.
If I look at the contents of /var/run/php-fpm.pid it contains 94751
Restarting php-fpm fails on an error because the address/socket 127.0.0.1:9999 is already in use.
---
root@mx:~ # service php-fpm restart
...
Starting php_fpm.
[ERROR] unable to bind listening socket for address '127.0.0.1:9999': Address already in use (48)
[ERROR] FPM initialization failed
/usr/local/etc/rc.d/php-fpm: WARNING: failed to start php_fpm
---
So, to troubleshoot I can do 'killall php-fpm', delete /var/run/php-fpm.pid, then restart php-fpm. This fixes the problem for 1 day, then the automated cron e-mail returns with a new pid #.
crontab doesn't have any newsyslog entries or any tasks that run at 7pm.
root@mx:~ # crontab -l
30 3 * * * /usr/local/bin/bash /var/vmail/backup/backup_mysql.sh >/dev/null 2>&1
# iRedAPD: Clean up expired tracking records hourly.
1 * * * * /usr/local/bin/python2 /opt/iredapd/tools/cleanup_db.py >/dev/null 2>&1
# iRedAPD: Convert SPF DNS record of specified domain names to IP
# addresses/networks hourly.
2 * * * * /usr/local/bin/python2 /opt/iredapd/tools/spf_to_greylist_whitelists.py >/dev/null
# iRedMail: Cleanup Amavisd database
1 2 * * * /usr/local/bin/python2 /usr/local/www/iredadmin/tools/cleanup_amavisd_db.py >/dev/null
# iRedAdmin: Clean up sql database.
1 * * * * /usr/local/bin/python2 /usr/local/www/iredadmin/tools/cleanup_db.py >/dev/null 2>&1
# iRedAdmin: Delete mailboxes on file system which belong to removed accounts.
1 * * * * /usr/local/bin/python2 /usr/local/www/iredadmin/tools/delete_mailboxes.py
# iRedMail: Cleanup Roundcube SQL database
2 2 * * * /usr/local/bin/php /usr/local/www/roundcube/bin/cleandb.sh >/dev/null
# iRedMail: Cleanup Roundcube temporary files under 'temp/' directory
2 2 * * * /usr/local/bin/php /usr/local/www/roundcube/bin/gc.sh >/dev/null
# iRedMail: Backup SOGo data databases on 04:01AM
1 4 * * * /usr/local/bin/bash /var/vmail/backup/backup_sogo.sh >/dev/null 2>&1
Any thoughts to what might cause this or solve?
I have already updated the php-fpm port to the latest version via FreeBSD ports to see if that helped, but no difference.
---
php -version
PHP 7.4.5 (cli) (built: Apr 25 2020 08:54:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
---
All services seem to be working normally, but I'm not sure what will happen if this isn't corrected.
Thanks in advance!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.