DB Connect Error [nagiosxi]: Database connection failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

profile.txt
I'm getting this error 'DB Connect Error [nagiosxi]: Database connection failed'
after restarting our Nagios instance. I tried
service postgresql restart
and it fails.

How can I fix this?
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: DB Connect Error [nagiosxi]: Database connection failed

Post by scottwilkerson »

Sounds like the hard drive may be full

can you run

Code: Select all

df -h
and post the output
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
36G 24G 11G 69% /
/dev/sda1 99M 57M 37M 61% /boot
tmpfs 6.0G 0 6.0G 0% /dev/shm
none 500M 3.8M 497M 1% /mnt/ram
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by scottwilkerson »

Ok, not full, can you run

Code: Select all

tail /var/lib/pgsql/pgstartup.log
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

I get the following after running that command

FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
/etc/profile: line 39: HISTSIZE: readonly variable
/etc/profile: line 60: HISTCONTROL: readonly variable
/etc/profile: line 61: HISTFILE: readonly variable
/etc/profile: line 62: HISTFILESIZE: readonly variable
/etc/profile: line 63: HISTIGNORE: readonly variable
/etc/profile: line 64: HISTSIZE: readonly variable
/etc/profile: line 65: HISTTIMEFORMAT: readonly variable
/etc/profile: line 79: PROMPT_COMMAND: readonly variable
FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by scottwilkerson »

looks like cannot creat the lock file...

lets check permissions on /tmp

Code: Select all

ls -ld /tmp
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

drwxr-xr-x 19 root root 32768 Nov 27 13:00 /tmp
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by scottwilkerson »

run

Code: Select all

chmod +w /tmp
Then try restarting postgresql again
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

Unfortunately postgresql still fails to start.
mcwhorts
Posts: 60
Joined: Fri Oct 07, 2011 11:59 am

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mcwhorts »

Would it hurt to re-run the upgrade script? Would this refresh postgresql?
Locked