Page 1 of 2
Database error ...
Posted: Mon Feb 11, 2019 9:37 am
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?
Re: Database error ...
Posted: Mon Feb 11, 2019 11:08 am
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?
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)?
Re: Database error ...
Posted: Mon Feb 11, 2019 11:43 am
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?
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?
Re: Database error ...
Posted: Mon Feb 11, 2019 12:08 pm
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.
Re: Database error ...
Posted: Mon Feb 11, 2019 12:25 pm
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.
Re: Database error ...
Posted: Mon Feb 11, 2019 12:33 pm
by benjaminsmith
Ok. Let me know if you have any questions.
Re: Database error ...
Posted: Tue Feb 12, 2019 5:50 am
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?!
Re: Database error ...
Posted: Tue Feb 12, 2019 9:18 am
by scottwilkerson
You may also need to restart postgresql if your system is running it after clearing some space.
Re: Database error ...
Posted: Tue Feb 12, 2019 11:13 am
by xpertech
OK I will do that tomorrow morning and see if the problem solved, thanks!
Re: Database error ...
Posted: Tue Feb 12, 2019 11:39 am
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