Database error ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Database error ...

Post by xpertech »

Several days ago, upgrade NagiosXI from 5.4.11 to 5.5.8 to 5.5.9, everything seem just fine, but a few days later, when try to web login to NagiosXI, the database error and can not be repaired, why and how to fix that?
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Database error ...

Post by benjaminsmith »

Hello @xpertech,

It looks like the database back-end is not loading.
ndo2db.service failed to run 'start-pre' task: No space left on device
How much disk space do you have left?

Code: Select all

df -h
If that's ok, please try re-starting the service and then run the repair script. Run the following to re-start the entire stack:

Code: Select all

systemctl stop crond
systemctl stop npcd
systemctl stop nagios
systemctl stop ndo2db
pkill -9 -u nagios
for i in $(ipcs -q | grep nagios |awk '{print $2}'); do ipcrm -q $i; done
rm -rf /usr/local/nagiosxi/var/dbmaint.lock
rm -rf /usr/local/nagiosxi/var/event_handler.lock
rm -rf /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
systemctl restart mysqld || systemctl restart mariadb
systemctl start ndo2db
systemctl start nagios
systemctl start npcd
systemctl start crond
systemctl restart httpd
Are you able to login? If so, go to Admin, are allow the components up running (green status)?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Database error ...

Post by xpertech »

benjaminsmith wrote:Hello @xpertech,

It looks like the database back-end is not loading.
ndo2db.service failed to run 'start-pre' task: No space left on device
How much disk space do you have left?

Code: Select all

df -h
If that's ok, please try re-starting the service and then run the repair script. Run the following to re-start the entire stack:

Code: Select all

systemctl stop crond
systemctl stop npcd
systemctl stop nagios
systemctl stop ndo2db
pkill -9 -u nagios
for i in $(ipcs -q | grep nagios |awk '{print $2}'); do ipcrm -q $i; done
rm -rf /usr/local/nagiosxi/var/dbmaint.lock
rm -rf /usr/local/nagiosxi/var/event_handler.lock
rm -rf /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
systemctl restart mysqld || systemctl restart mariadb
systemctl start ndo2db
systemctl start nagios
systemctl start npcd
systemctl start crond
systemctl restart httpd
Are you able to login? If so, go to Admin, are allow the components up running (green status)?

I can not login. (I had not yet running those command)

Do you mean after running the above command and the repair script, then login to Admin to see if the components running?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Database error ...

Post by benjaminsmith »

Hi @xpertech
I can not login
Are you able to establish an ssh connection to the server? First let's make sure you're not running out of space, then re-start the stack and see if that corrects the problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Database error ...

Post by xpertech »

Are you able to establish an ssh connection to the server? First let's make sure you're not running out of space, then re-start the stack and see if that corrects the problem.
Yes ,can SSH to NagiosXI.
Will re-start the stack later and see if it work.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Database error ...

Post by benjaminsmith »

Ok. Let me know if you have any questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Database error ...

Post by xpertech »

When checked the space, it did short of space, after add some space and then run the repair process, it succeed but still can not login from GUI?!
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Database error ...

Post by scottwilkerson »

You may also need to restart postgresql if your system is running it after clearing some space.

Code: Select all

systemctl postgresql restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Database error ...

Post by xpertech »

OK I will do that tomorrow morning and see if the problem solved, thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Database error ...

Post by scottwilkerson »

xpertech wrote:OK I will do that tomorrow morning and see if the problem solved, thanks!
Let us know how it comes out
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked