When I go to my web interface I get message.
"Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB"
I've run this command on the console of the server. It fails.
Should I just grab the newest template from the website and start over?
Nagios Instance Failed
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios Instance Failed
I have no idea how far you are into things, so no idea if that's a good idea or not.lance.peterson wrote: Should I just grab the newest template from the website and start over?
First off, what's the output of the following? Please note that you will need to remove the "#" before each command line for the commands to work.
# df -i
# df -h
# du -hsx * | sort -rh | head -10
It's possible you are out of space. If that's the case, please follow https://assets.nagios.com/downloads/nag ... M-Disk.pdf
Please run through https://assets.nagios.com/downloads/nag ... tabase.pdf and report any errors. If you stop at any point, please know at which point you stop.
***You can skip the script, but if the other instructions in the document do not resolve the issue, please continue.***
Regarding the instructions below, if you do not have killall, you can install it via the following command:
# yum install psmisc
If psmisc is not in your repos, then instead you can check to make sure nagios is not running with
# ps -aef | grep nagios
Please note that you do not need to run the above ps command unless you don't have killall. It's one or the other. In either case, there should be no nagios processes. The service nagios stop command *should* stop all processes. However, the fact that you are contacting support suggests your system is in an unstable state, so the killall command is there just to make sure nothing weird is hanging around.
If the above document does not resolve your issue, please run the following commands in order and report any errors. You ***must*** use mariadb instead of mysqld in the commands below, ***if*** you have mariadb.
# service nagios stop
# service ndo2db stop
# service mysqld stop
# service crond stop
# service httpd stop
# killall -9 nagios
# killall -9 ndo2db
# rm -f /usr/local/nagios/var/rw/nagios.cmd
# rm -f /usr/local/nagios/var/nagios.lock
# rm -f /usr/local/nagios/var/ndo.sock
# rm -f /usr/local/nagios/var/ndo2db.lock
# rm -f /usr/local/nagiosxi/var/reconfigure_nagios.lock
# for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
# service mysqld start
# service ndo2db start
# service nagios start
# service httpd start
# service crond start
If that does not resolve the issue, can you send me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button in the top right corner. *If* for whatever reason you cannot download the profile, please put the output of View System Info (5.3.4+, Show Profile if older). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.
If zip files are not allowed, or the attachment is too large, feel free to use http://otrs.nagios.com/upload.php but please make sure you fill in the ticket# appropriately. If you do not see the ticket # in your subject, I will be happy to give it to you.
If you get an error that PROFILE BUILD FAILED, please see https://support.nagios.com/kb/article.p ... ategory=44
-
lance.peterson
- Posts: 64
- Joined: Wed Aug 05, 2015 11:10 am
Re: Nagios Instance Failed
See attachment for output of Commands
You do not have the required permissions to view the files attached to this post.
-
lance.peterson
- Posts: 64
- Joined: Wed Aug 05, 2015 11:10 am
Re: Nagios Instance Failed
I added space to the drive. Ran through the article on resizing the drive. Then ran the command to repair the database and it completed this time without issue. Rebooted the server and now I can get back into my installation. Looks like I'm good at this point. Thanks!
-
kyang
Re: Nagios Instance Failed
Sounds good!
Did you have any more questions or are we okay to close this thread?
Did you have any more questions or are we okay to close this thread?
-
kyang
Re: Nagios Instance Failed
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!