Nagios service will not start after reboot

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

slansing wrote:That was an example for another service, use nagios instead as that is what you are trying to do here.
yeah.. I realize that now and feel a little dumb :oops:
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

mlong wrote:
slansing wrote:If you are running 9.x or greater you should be able to do the following:

Code: Select all

update-rc.d dhcp3-server enable
Otherwise we will need to go abrist's rout, or install the chkconfig package which will automatically symlink and do this for you.
These are the results I got from this command:

update-rc.d: using dependency based boot sequencing
update-rc.d: error: cannot find a LSB script for dhcp3-server
now this, I find interesting
update-rc.d: using dependency based boot sequencing
update-rc.d: error: nagios Default-Start contains no runlevels, aborting.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios service will not start after reboot

Post by abrist »

What is the output of:

Code: Select all

find /etc/rc?.d/| grep nagios
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

abrist wrote:What is the output of:

Code: Select all

find /etc/rc?.d/| grep nagios
/etc/rc0.d/K01nagios
/etc/rc1.d/K01nagios
/etc/rc2.d/K01nagios
/etc/rc3.d/S99nagios_1
/etc/rc3.d/S99nagios
/etc/rc3.d/S99nagios_2
/etc/rc4.d/S99nagios_1
/etc/rc4.d/S99nagios
/etc/rc4.d/S99nagios_2
/etc/rc5.d/S99nagios_1
/etc/rc5.d/S99nagios
/etc/rc5.d/S99nagios_2
/etc/rc6.d/K01nagios
/etc/rcS.d/S99nagios
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios service will not start after reboot

Post by abrist »

Does the following command work? If not, what errors do you get?

Code: Select all

update-rc.d -f nagios defaults 99
EDIT:
You might also need:

Code: Select all

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

abrist wrote:Does the following command work? If not, what errors do you get?

Code: Select all

update-rc.d -f nagios defaults 99
EDIT:
You might also need:

Code: Select all

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
That first command gives me a whole slew of errors

Code: Select all

update-rc.d: using dependency based boot sequencing                                                                                                                                           
insserv: warning: script 'K01nagios' missing LSB tags and overrides                                                                                                                           
insserv: warning: script 'S99nagios_1' missing LSB tags and overrides                                                                                                                         
insserv: warning: script 'S99nagios_2' missing LSB tags and overrides                                                                                                                         
insserv: warning: script 'nagios' missing LSB tags and overrides                                                                                                                              
insserv: warning: current start runlevel(s) (3 4 5 S) of script `nagios' overwrites defaults (2 3 4 5).                                                                                       
insserv: warning: current stop runlevel(s) (0 1 2 6) of script `nagios' overwrites defaults (0 1 6).                                                                                          
insserv: There is a loop at service nagios_1 if started                                                                                                                                       
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Starting nagios depends on webmin and therefore on system facility `$all' which can not be true!                                                                                     
insserv: Max recursions depth 99 reached                                                                                                                                                      
insserv: There is a loop between service nagios and stop-bootlogd-single if started                                                                                                           
insserv:  loop involving service stop-bootlogd-single at depth 9                                                                                                                              
insserv:  loop involving service nagios at depth 8                                                                                                                                            
insserv:  loop involving service mountnfs at depth 7                                                                                                                                          
insserv: There is a loop between service webmin and resolvconf if started                                                                                                                     
insserv:  loop involving service resolvconf at depth 5                                                                                                                                        
insserv:  loop involving service mountall at depth 4                                                                                                                                          
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios and stop-bootlogd-single if started                                                                                                           
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios_1 and mountall if started                                                                                                                     
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios_1 and checkroot if started                                                                                                                    
insserv:  loop involving service checkroot at depth 3                                                                                                                                         
insserv:  loop involving service hdparm at depth 2                                                                                                                                            
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios_1 and mountnfs if started                                                                                                                     
insserv:  loop involving service networking at depth 7                                                                                                                                        
insserv:  loop involving service checkfs at depth 4                                                                                                                                           
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service hwclockfirst at depth 3                                                                                                                                      
insserv:  loop involving service hostname at depth 4                                                                                                                                          
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service webmin and ifupdown-clean if started                                                                                                                 
insserv:  loop involving service ifupdown-clean at depth 6                                                                                                                                    
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios_1 and mountdevsubfs if started                                                                                                                
insserv:  loop involving service mountdevsubfs at depth 2                                                                                                                                     
insserv:  loop involving service udev at depth 1                                                                                                                                              
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service ifupdown at depth 9                                                                                                                                          
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop at service webmin if started                                                                                                                                         
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service module-init-tools at depth 6                                                                                                                                 
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service mountoverflowtmp at depth 9                                                                                                                                  
insserv:  loop involving service mountall-bootclean at depth 8                                                                                                                                
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service bootlogd at depth 4                                                                                                                                          
insserv:  loop involving service nagios_1 at depth 1                                                                                                                                          
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: There is a loop between service nagios_1 and mountoverflowtmp if started                                                                                                             
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv:  loop involving service mtab at depth 7                                                                                                                                              
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!                                                                       
insserv: Max recursions depth 99 reached
I have already run the second command as part of my initial Nagios setup. I ran it again and there was no feedback
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

Okay, now the service is starting on reboot...
Not sure which of the steps fixed the issue, but this time when I ran ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios and rebooted, the service started up.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios service will not start after reboot

Post by abrist »

Great! Is this thread lock-ready?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mlong
Posts: 26
Joined: Mon Aug 12, 2013 12:36 pm

Re: Nagios service will not start after reboot

Post by mlong »

abrist wrote:Great! Is this thread lock-ready?
I guess so. which I knew the exact step that fixed it though
Locked