Page 1 of 1
DB Connect Error [nagiosxi]: Database connection failed DB C
Posted: Thu Aug 15, 2013 10:29 pm
by divya9raj
Hi Nagios Team,
Until last week, Nagios XI which I am running using the VMware was working well, but today when i tried to login, I got the following error:
DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed
Then, I tried searching for solution in this forum, but suggestions were asked to check if mysql and postgresql was running.
After checking these in my case, mysql seems to be running by postgresql failed to start. It stopped, but failed to start the service.
And I tried running the suggested command: df -h
I have attached the output here, but it doesn't seem to be hard disk issue.
output.jpg
Please help! Thanks in advance!
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Fri Aug 16, 2013 9:36 am
by abrist
Try to start the postgresql service, post the output here (looking for more information):
Code: Select all
service postgresql start
tail /var/lib/pgsql/pgstartup.log
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Mon Aug 19, 2013 2:08 am
by divya9raj
Okay, I have tried the command given and attached here is the output.
output.jpg
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Mon Aug 19, 2013 10:00 am
by slansing
Have you tried starting Postgres with either of the commands shown in your picture? Can you also try the following "slight change":
Code: Select all
service postgresql start
tail -50 /var/lib/pgsql/pgstartup.log
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Tue Aug 20, 2013 4:09 am
by divya9raj
The following shows the output of the tail -50 /var/lib/pgsql/pgstartup.log
command.jpg
And I tried one of the command shown on the picture but it shoots me error as in the figure attached here.
output-1.jpg
When i tried to connecting it using psql command line tool, it threw me the following error.
boohoo-1.jpg
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Tue Aug 20, 2013 11:01 am
by sreinhardt
Let's also do a "df -i" to check inodes since this has been a little bit. Additionally, did anything aside from this happen to your server? Such as power failures or disk issues? It seems that each time you start postgres it is starting for the very first time, initializing everything as though it was new.
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Tue Aug 20, 2013 9:06 pm
by divya9raj
There was no issue on the server, we just had to restart the server last week.
And I tried 'df -i' command, following shows the output.
df-i.jpg
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Wed Aug 21, 2013 11:00 am
by sreinhardt
When you restarted the server, was this done via power button or vmware restart action, or the actual shutdown -r\restart command in linux?
Re: DB Connect Error [nagiosxi]: Database connection failed
Posted: Wed Aug 21, 2013 11:09 am
by lmiltchev
Run the following commands, and show the output:
Code: Select all
echo "vacuum;vacuum analyse;vacuum full;"|psql nagiosxi postgres
service postgresql status
Can you log in postgres by running the following command?