Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nagios Core 4.5.9 - Fresh install on Ubuntu 24.04 service takes approximately 17 minutes to start #1017

Open
saitohas opened this issue Jan 10, 2025 · 20 comments
Labels

Comments

@saitohas
Copy link

"I followed the step-by-step installation several times and I can't figure out why the service takes so long to start. There are no errors in the Nagios, Apache, or Ubuntu logs. I've tried everything and there's no way to get Nagios to start normally."

image

@ericloyd
Copy link

Just curious if you have localhost in your /etc/hosts file? Or some DNS failure? Sounds like it's waiting for a name translation.

@saitohas
Copy link
Author

Yes, this is not the problem

image

@ericloyd
Copy link

Does restarting it also take so long? Or only startup?

@saitohas
Copy link
Author

Same delay

@ericloyd
Copy link

What happens when you execute the following as root:

time /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

@saitohas
Copy link
Author

image

@ericloyd
Copy link

Okay, so I don't think it's Nagios itself that has the problem, it's something system related that it's expecting to do and that's hanging until a timeout finishes and then it continues. I'll see if I can get one of our techs to do this install on a box today and see what it does.

I assume you did a normal 24.04 LTS minimal server install?

@saitohas
Copy link
Author

Yes, normal 24.04 LTS install

@saitohas
Copy link
Author

This issue is not specific to this version, it has been occurring since the versions released at the beginning of 2024

@tsadpbb
Copy link
Contributor

tsadpbb commented Jan 14, 2025

I'm curious if you still have the problem with the check_for_updates value set to 0 in the main configuration file

@saitohas
Copy link
Author

Set check_for_updates to 0

image

It work´s!

image

But now this alert appears on the main screen

@tsadpbb
Copy link
Contributor

tsadpbb commented Jan 15, 2025

I have been seeing a lot of problems with the check_for_updates functionality, I will look into it

@tsadpbb
Copy link
Contributor

tsadpbb commented Jan 15, 2025

What kind of environment do you have your nagios core system in? Is it offline? Can the nagios core system connect to api.nagios.com?

@saitohas
Copy link
Author

It's not offline; it can connect to api.nagios.com, but we use a proxy server that might be affecting the update verification.

@ericloyd
Copy link

As I wrote in my previous reply, it's hanging, waiting for something. In this case, likely getting to the update server through your proxy. We did the install on a 24.04 LTS box and had no problems. I'll see what happens if we redirect api.nagios.com to be a bitbucket IP, but I suspect we'll see your timeout issue.

@tsadpbb
Copy link
Contributor

tsadpbb commented Jan 16, 2025

Could you try enabling the check for updates option again and then try running nagios in your terminal with timing points enabled like /usr/local/nagios/bin/nagios -T /usr/local/nagios/etc/nagios.cfg?

Then we'll be able to see where it's getting hung up during the start up process.

@saitohas
Copy link
Author

Image

@tsadpbb
Copy link
Contributor

tsadpbb commented Jan 16, 2025

So /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg works and can find the config file but
/usr/local/nagios/bin/nagios -T /usr/local/nagios/etc/nagios.cfg doesn't and can't?

@saitohas
Copy link
Author

Today worked

root@nagios:/usr/local/nagios/etc/servers# /usr/local/nagios/bin/nagios -T /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.5.9
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2024-12-19
License: GPL

Website: https://www.nagios.org
[0.0000 (+0.0000)] Variables reset
[0.0005 (+0.0005)] Main config file read
Nagios 4.5.9 starting... (PID=134908)
Local time is Fri Jan 17 11:11:52 UTC 2025
[0.0018 (+0.0013)] NEB module API initialized
[0.0019 (+0.0002)] Query handler initialized
wproc: Successfully registered manager as @wproc with query handler
[0.0029 (+0.0009)] 4 workers spawned
wproc: Registry request: name=Core Worker 134909;pid=134909
wproc: Registry request: name=Core Worker 134910;pid=134910
wproc: Registry request: name=Core Worker 134912;pid=134912
wproc: Registry request: name=Core Worker 134911;pid=134911
[0.0093 (+0.0065)] 4 workers connected
[0.0094 (+0.0001)] Modules loaded
[0.0094 (+0.0000)] First callback made
[0.0094 (+0.0000)] Reading config data from '/usr/local/nagios/etc/nagios.cfg'
WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[0.0140 (+0.0045)] Done parsing config files
[0.0141 (+0.0002)] Done resolving objects
[0.0141 (+0.0000)] Done recombobulating contactgroups
[0.0142 (+0.0000)] Done recombobulating hostgroups
[0.0143 (+0.0002)] Created 117 services (dupes possible)
[0.0143 (+0.0000)] Done recombobulating servicegroups
[0.0143 (+0.0000)] Created 0 hostescalations (dupes possible)
[0.0144 (+0.0000)] Created 0 serviceescalations (dupes possible)
[0.0144 (+0.0000)] Done merging hostextinfo
[0.0144 (+0.0000)] Done merging serviceextinfo
[0.0144 (+0.0001)] Done propagating inherited object properties
[0.0145 (+0.0001)] 5 timeperiods registered
[0.0145 (+0.0000)] 24 commands registered
[0.0145 (+0.0000)] 1 contactgroups registered
[0.0145 (+0.0000)] 1 hostgroups registered
[0.0145 (+0.0000)] 0 servicegroups registered
[0.0145 (+0.0000)] 1 contacts registered
[0.0148 (+0.0003)] 110 hosts registered
[0.0151 (+0.0003)] 117 services registered
[0.0151 (+0.0000)] 1 contactgroup memberships registered
[0.0151 (+0.0000)] 1 hostgroup memberships registered
[0.0151 (+0.0000)] 0 servicegroup memberships registered
[0.0151 (+0.0000)] 0 unique / 0 total servicedependencies registered
[0.0151 (+0.0000)] 0 serviceescalations registered
[0.0151 (+0.0000)] 0 unique / 0 total hostdependencies registered
[0.0151 (+0.0000)] 0 hostescalations registered
[0.0152 (+0.0001)] Done post-processing servicedependencies
[0.0152 (+0.0000)] Done post-processing host dependencies
[0.0152 (+0.0000)] Done post-sorting slave objects
[0.0152 (+0.0000)] Done post-processing configuration
[0.0154 (+0.0002)] Object configuration parsed and understood
[0.0155 (+0.0000)] Limit detection[0.0170 (+0.0015)] Objects cached
[0.0170 (+0.0001)] Event queue initialized
[0.0172 (+0.0001)] Status data initialized
[0.0173 (+0.0001)] Downtime data initialized
[0.0173 (+0.0000)] Retention data initialized
[0.0213 (+0.0039)] Initial state information read
[0.0213 (+0.0000)] Comment data initialized
[0.0213 (+0.0000)] Performance data initialized
[0.0255 (+0.0043)] Event timing loop initialized
[0.0256 (+0.0000)] check stats initialized
[0.0256 (+0.0000)] Update check concluded
[0.0307 (+0.0052)] Status data updated
[0.0308 (+0.0000)] Initial states logged
Successfully launched command file worker with pid 134913
[0.0312 (+0.0004)] Command file worker launched
[0.0312 (+0.0000)] Entering event execution loop

@saitohas
Copy link
Author

Continue

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants