Page 1 of 1

Backend database shows as not running

Posted: Mon Jul 24, 2017 11:56 am
by sgd
Hello,

I'm working with our backup Nagios XI server, which we usually don't pay much attention to. It's located in a remote data center and we need it now to monitor the data center where the primary Nagios XI server resides.

The machine is running CentOS Linux release 7.1.1503 (Core) and Nagios XI version 5.4.7.

The problem is that in the XI Component Status window the database backend shows as not running. I can start it, and I get a popup saying the command processed successfully, but it still shows as not running.

I've run repair_databases.sh multiple times, with no apparent problems, and also have rebooted the machine once.

The monitors seem to be running and updating the database OK, so I think the problem is with Nagios XI not displaying the status correctly, not with the Mariadb itself.

I'm not sure what to do to fix that, which is why I've submitted this post.

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 1:12 pm
by dwhitfield
There was a bug in an earlier version. Perhaps it didn't actually apply when you upgraded? Assuming this was upgraded at some point, do you know which version it started on? Also, if you still have the upgrade.log, could you send that?

Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). 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.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

UPDATE: Profile and upgrade.log received and shared with techs.

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 1:58 pm
by sgd
Hello,

I have sent you a copy of my profile.

I also attempted to send a copy of upgrade.log, but your PM system does not allow me to include more than one attachment per post. It also would not allow me to send you a second PM, saying I'm not permitted to send one so soon after the first one.

I shall try to send the upgrade.log again in a bit.

I did upgrade just today, from 5.4.3, I believe. The problem existed in the previous installation, and part of the reason for the upgrade was to see if it would fix the problem.

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 2:01 pm
by sgd
Hello,

I was just able to send you a second PM with my upgrade.log.

Thanks.

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 2:02 pm
by sgd
Hello,

Just a note, I was unable to log back into the NagiosXI web interface after the recent upgrade, and had to reset the nagiosadmin password in order to access the website.

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 4:05 pm
by ssax
Please run these commands as root and see if it resolves the issue for you:

Code: Select all

service npcd stop
service nagios stop
service ndo2db stop
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql stop; fi;
service mysqld restart
rm -rf /usr/local/nagios/var/rw/nagios.cmd
rm -rf /usr/local/nagios/var/nagios.lock
rm -rf /usr/local/nagios/var/ndo.sock
rm -rf /usr/local/nagios/var/ndo2db.lock
rm -rf /usr/local/nagiosxi/var/reconfigure_nagios.lock
rm -rf /var/lib/mrtg/mrtg_l
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
pkill -9 -u nagios
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql start; fi;
service httpd restart
service ndo2db start
service nagios start
service npcd start
service crond restart
Then send the result of these commands (as root):

Code: Select all

ipcs -q
ps aux | grep "nagios.cfg\|ndo"
chage -l nagios
Thank you

Re: Backend database shows as not running

Posted: Mon Jul 24, 2017 4:32 pm
by sgd
Running those commands took care of the problem.

Feel free to lock/close this topic.

Thanks!