I updated the OS on our Naigos instances this morning. One of them came back fine. The other one started throwing a DB error. Here it is:
Databse Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
I have run the repair multiple times. I have done a DB sweep multiple times. I have even rebooted the box a couple of times. Still shows an error.
When I run service postgres status I get the following
Hello, @SavaSC.
I know you've already done troubleshooting on your own but please follow this tutorial in case you've missed something: https://support.nagios.com/kb/article.php?id=25
Also, I'd like to see the system profile in order to go over some major log files.
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and attach it to your next post. Or you could upload it to the cloud storage of your choice and share a link with me in PM.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
[root@APNagiosXI ~]# service ndo2db start
Starting ndo2db (via systemctl): [ OK ]
[root@APNagiosXI ~]# service ndo2db status
ndo2db is not running but subsystem locked
Here is the requested log file.
postgresql-Mon.log
You do not have the required permissions to view the files attached to this post.
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
If that 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
[root@APNagiosXI ~]# service nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@APNagiosXI ~]# service ndo2db stop
Stopping ndo2db (via systemctl): [ OK ]
[root@APNagiosXI ~]# service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service
Failed to stop mysqld.service: Unit mysqld.service not loaded.
[root@APNagiosXI ~]# service crond stop
Redirecting to /bin/systemctl stop crond.service
[root@APNagiosXI ~]# service httpd stop
Redirecting to /bin/systemctl stop httpd.service
[root@APNagiosXI ~]# killall -9 nagios
nagios: no process found
[root@APNagiosXI ~]# killall -9 ndo2db
ndo2db: no process found
[root@APNagiosXI ~]# rm -f /usr/local/nagios/var/rw/nagios.cmd
[root@APNagiosXI ~]# rm -f /usr/local/nagios/var/nagios.lock
[root@APNagiosXI ~]# rm -f /usr/local/nagios/var/ndo.sock
[root@APNagiosXI ~]# rm -f /usr/local/nagios/var/ndo2db.lock
[root@APNagiosXI ~]# rm -f /usr/local/nagiosxi/var/reconfigure_nagios.lock
[root@APNagiosXI ~]# for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
[root@APNagiosXI ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.
[root@APNagiosXI ~]# service ndo2db start
Starting ndo2db (via systemctl): [ OK ]
[root@APNagiosXI ~]# service nagos start
Redirecting to /bin/systemctl start nagos.service
Failed to start nagos.service: Unit not found.
[root@APNagiosXI ~]# service nagios start
Starting nagios (via systemctl): [ OK ]
[root@APNagiosXI ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
[root@APNagiosXI ~]# service crond start
Redirecting to /bin/systemctl start crond.service
[root@APNagiosXI ~]#
It seems to be saying that their isn't a mysqld service.
Your assessment is accurate. The good news is I have already likely given you the resolution.
dwhitfield wrote: You ***must*** use mariadb instead of mysqld in the commands below, ***if*** you have mariadb.
More importantly, getting rid of the ndo2db lock and sock file was what I really wanted to do, which appears to have worked. Does ndo2db still give the weird status?