DB Connect Error [nagiosxi]: Database connection failed
DB Connect Error [nagiosxi]: Database connection failed
Hi Team,
I have issue with Nagios XI server which is throwing below error.
DB Connect Error [nagiosxi]: Database connection failed
I see that the https, nagios and msql services are up and running.
Can you help me out in this regard ?
I have issue with Nagios XI server which is throwing below error.
DB Connect Error [nagiosxi]: Database connection failed
I see that the https, nagios and msql services are up and running.
Can you help me out in this regard ?
Re: DB Connect Error [nagiosxi]: Database connection failed
If you are running an older version of Nagios XI, the nagiosxi database was hosted by the Postgres database so try running this to see if that fixes the issue.
If that doesn't work, run the following in a shell on the Nagios server and that will tell us which database the server is using.
Please post the output.
Code: Select all
service postgresql restartPlease post the output.
Code: Select all
grep dbtype /usr/local/nagiosxi/html/config.inc.phpBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: DB Connect Error [nagiosxi]: Database connection failed
Hi,
Thanks for the reply.
I have restarted postgresql service and it work like a charm, but i see all the services and hosts have vanished and it showed me the Installation page after fresh install of Nagios XI
Thanks for the reply.
I have restarted postgresql service and it work like a charm, but i see all the services and hosts have vanished and it showed me the Installation page after fresh install of Nagios XI
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
Quickest thing might be to restore from backup. Can you pm me your profile and the output of your history command? There might be a clue there. After you pm you must respond to this thread for it to come back up on our support dashboard.
Re: DB Connect Error [nagiosxi]: Database connection failed
Hi,dwhitfield wrote:Quickest thing might be to restore from backup. Can you pm me your profile and the output of your history command? There might be a clue there. After you pm you must respond to this thread for it to come back up on our support dashboard.
I haved PMed the files.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
I got the history, but not the profile. Can you try that again? Thanks!
Re: DB Connect Error [nagiosxi]: Database connection failed
Hi,
When i'm trying to restore backup from another server, i got hang while restoring MySQL backup.
When i have stopped the script got the error message as
When i have manually logged in using the default password able to login.
Please find the screenshot and suggest on how to move on.
When i'm trying to restore backup from another server, i got hang while restoring MySQL backup.
When i have stopped the script got the error message as
Code: Select all
Restoring MySQL databases...
^CCtrl-C -- sending "KILL QUERY 283235" to server ...
Ctrl-C -- query aborted.
ERROR 1317 (70100) at line 22: Query execution was interrupted
Error restoring MySQL database 'nagios' - check the password in this script!Please find the screenshot and suggest on how to move on.
You do not have the required permissions to view the files attached to this post.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
Please post your /etc/my.cnf
Also, what's the output of the two following commands:
How long did you wait? If the backup is large, it could take a while.
How many hosts and services were you monitoring?
Does the CCM show the same amount of hosts/services as the Summary page? Those are actually in the nagiosql and nagios databases, not the nagiosxi database.
Are you able to log into all of the databases locally? The default password for root is nagiosxi, if you are not sure if you changed the passwords.
Also, what's the output of the two following commands:
Code: Select all
df -i
df -h
How many hosts and services were you monitoring?
Does the CCM show the same amount of hosts/services as the Summary page? Those are actually in the nagiosql and nagios databases, not the nagiosxi database.
Are you able to log into all of the databases locally? The default password for root is nagiosxi, if you are not sure if you changed the passwords.
Re: DB Connect Error [nagiosxi]: Database connection failed
Please find the output of /etc/my.cnf
df -i & df -h
We are monitoring only two hosts and around 7 services that's it.
Code: Select all
cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pidCode: Select all
[root@Nagios ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00
632736 117498 515238 19% /
tmpfs 220357 1 220356 1% /dev/shm
/dev/sda1 25688 38 25650 1% /boot
[root@Nagios ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9.5G 5.5G 3.6G 61% /
tmpfs 1012M 0 1012M 0% /dev/shm
/dev/sda1 97M 21M 72M 23% /boot
[root@Nagios ~]#-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: DB Connect Error [nagiosxi]: Database connection failed
I may not have been clear in my inquiry. If 2 hosts and 7 services vanished, why don't you just add them back? What I'm trying to get at is how large is your backup. Did you have any backups from further back you tried?cyient wrote: services and hosts have vanished
How long did you wait for the mysql backup to restore? I'm also a bit confused because you gave a screenshot without an error message but then gave an error message in the text. Please try to be as precise as possible when giving the order and timing of events.