Reproduce the error message shown above.
Make sure Naemon is running:
ps -eaf |grep naemon
nagios 746 1645 0 12:15 ? 00:00:00 /opt/openitc/nagios/bin/naemon --worker /opt/openitc/nagios/var/rw/nagios.qh
nagios 748 1645 0 12:15 ? 00:00:00 /opt/openitc/nagios/bin/naemon --worker /opt/openitc/nagios/var/rw/nagios.qh
nagios 749 1645 0 12:15 ? 00:00:00 /opt/openitc/nagios/bin/naemon --worker /opt/openitc/nagios/var/rw/nagios.qh
nagios 750 1645 0 12:15 ? 00:00:00 /opt/openitc/nagios/bin/naemon --worker /opt/openitc/nagios/var/rw/nagios.qh
nagios 1645 1 0 07:48 ? 00:00:33 /opt/openitc/nagios/bin/naemon -d /opt/openitc/etc/nagios/nagios.cfg
nagios 1805 1645 0 07:48 ? 00:00:00 /opt/openitc/nagios/bin/naemon -d /opt/openitc/etc/nagios/nagios.cfg
Now kill the core worker processes
kill -9 746 748 749 750
the worker processes are now defunct
ps -eaf |grep naemon
nagios 746 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 748 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 749 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 750 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 1645 1 0 07:48 ? 00:00:34 /opt/openitc/nagios/bin/naemon -d /opt/openitc/etc/nagios/nagios.cfg
nagios 1805 1645 0 07:48 ? 00:00:00 /opt/openitc/nagios/bin/naemon -d /opt/openitc/etc/nagios/nagios.cfg
The naemon.log will now report the Socket errors (obviously)
[1626260823] wproc: Socket to worker Core Worker 746 broken, removing
[1626260823] wproc: Socket to worker Core Worker 748 broken, removing
[1626260823] wproc: nm_bufferqueue_read() from Core Worker 750 returned -1: Connection reset by peer
[1626260823] wproc: Socket to worker Core Worker 750 broken, removing
[1626260823] Unable to send check for service '68960b89-013a-4981-9da7-4bba285bbff0' on host 'f9549a4f-2b5e-4f57-a91f-9d8d44f5519d' to worker (ret=-2)
[1626260826] Unable to send check for service 'bedb99e2-ecd4-45dd-b2fb-2b0bf87976d4' on host 'aef17b79-4188-44f9-b2ab-0716a98a9e3f' to worker (ret=-2)
[1626260826] Unable to send check for service '74fd8f59-1348-4e16-85f0-4a5c57c7dd62' on host 'c36b8048-93ce-4385-ac19-ab5c90574b77' to worker (ret=-2)
[1626260830] Unable to send check for service '149f47e0-5882-47e3-9f6a-ec8b96c4d0c4' on host 'aef17b79-4188-44f9-b2ab-0716a98a9e3f' to worker (ret=-2)
[1626260830] Unable to send check for service '95010dc2-23c8-41bf-a62a-3b6662958d9f' on host 'aef17b79-4188-44f9-b2ab-0716a98a9e3f' to worker (ret=-2)
[1626260832] Unable to send check for host '1d902a3d-bcc7-4980-8d9a-1f258e557c49' to worker (ret=-2)
You can even kill the one naemon process naemon forked by itself.
kill -9 1805
ps -eaf |grep naemon
nagios 746 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 748 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 749 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 750 1645 0 12:15 ? 00:00:00 [naemon] <defunct>
nagios 1645 1 0 07:48 ? 00:00:34 /opt/openitc/nagios/bin/naemon -d /opt/openitc/etc/nagios/nagios.cfg
nagios 1805 1645 0 07:48 ? 00:00:00 [naemon] <defunct>