Database error ...
Database error ...
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 ...
Hello @xpertech,
It looks like the database back-end is not loading.
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:
Are you able to login? If so, go to Admin, are allow the components up running (green status)?
It looks like the database back-end is not loading.
How much disk space do you have left?ndo2db.service failed to run 'start-pre' task: No space left on device
Code: Select all
df -h
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
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Database error ...
benjaminsmith wrote:Hello @xpertech,
It looks like the database back-end is not loading.How much disk space do you have left?ndo2db.service failed to run 'start-pre' task: No space left on deviceIf 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
df -hAre you able to login? If so, go to Admin, are allow the components up running (green status)?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
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 ...
Hi @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.I can not login
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Database error ...
Yes ,can SSH to NagiosXI.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.
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 ...
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Database error ...
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 ...
You may also need to restart postgresql if your system is running it after clearing some space.
Code: Select all
systemctl postgresql restartRe: Database error ...
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 ...
Let us know how it comes outxpertech wrote:OK I will do that tomorrow morning and see if the problem solved, thanks!