Nagios Core - Nagios did not exit in a timely manner


Problem Description

In larger deployments of nagios, stopping or restarting the nagios service may result in the error:

Nagios did not exit in a timely manner

This is due to many factors in large deployments, but basically it is just a timeout issue.

 

Resolving The Problem

You can update the nagios init script to increase how long the script is allowed to run for.

Edit the file of /etc/init.d/nagios and find this line:

for i in 1 2 3 4 5 6 7 8 9 10 ; do

 Change it to:

for i in {1..90} ; do

 

This changes the timeout to 90 seconds, increase to a larger number as required.

 
NOTE

This change will be overwritten each time an upgrade of Nagios XI or Nagios Core occurs, you will need to re-modify after an upgrade.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Article ID: 172
Created On: Wed, Jan 27, 2016 at 4:48 PM
Last Updated On: Mon, May 20, 2019 at 4:32 PM
Authored by: tlea

Online URL: https://support.nagios.com/kb/article/nagios-core-nagios-did-not-exit-in-a-timely-manner-172.html