Nagios XI Database Connect Problem
Posted: Thu Nov 19, 2015 3:35 pm
I'm getting the same problem as "by bsivavani ยป Tue Nov 17, 2015 12:56 pm" was getting.
So I tried to follow along and see if his fix would work for me.
I had previously ran /usr/local/nagiosxi/scripts/repair_databases.sh and it never worked, but I ran it again.
Came up with the same errors as usual...
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
/usr/local/nagiosxi/scripts
===============
REPAIR COMPLETE
===============
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
Starting ndo2db: done.
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
Checked my filesystem sizes, but that didn't seem to be a problem.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root 31G 11G 19G 37% /
tmpfs 935M 0 935M 0% /dev/shm
/dev/sda1 477M 75M 377M 17% /boot
/dev/mapper/vg_root-lv_var 23G 3.1G 19G 15% /var
/dev/mapper/vg_root-lv_tmp 976M 1.3M 924M 1% /tmp
/dev/mapper/vg_root-lv_home 1.5G 5.4M 1.4G 1% /home
/dev/mapper/vg_root-lv_apps 5.8G 26M 5.5G 1% /apps
# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_root-lv_root 2.0M 317K 1.7M 16% /
tmpfs 234K 1 234K 1% /dev/shm
/dev/sda1 126K 52 125K 1% /boot
/dev/mapper/vg_root-lv_var 1.5M 413K 1.1M 28% /var
/dev/mapper/vg_root-lv_tmp 64K 25 64K 1% /tmp
/dev/mapper/vg_root-lv_home 96K 500 96K 1% /home
/dev/mapper/vg_root-lv_apps 384K 970 384K 1% /apps
ran the postgresql restart
# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
greped the processes for post, but if you needed to see everything, I'll paste the whole thing here later.
# ps -ef | grep post
postgres 19719 1 0 12:10 ? 00:00:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 19763 19719 0 12:10 ? 00:00:00 postgres: logger process
postgres 19765 19719 0 12:10 ? 00:00:00 postgres: writer process
postgres 19766 19719 0 12:10 ? 00:00:00 postgres: wal writer process
postgres 19767 19719 0 12:10 ? 00:00:00 postgres: autovacuum launcher process
postgres 19768 19719 0 12:10 ? 00:00:00 postgres: stats collector process
postgres 19820 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19918 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20002 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20113 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20188 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20263 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20271 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20389 19719 0 12:13 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23609 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23611 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23615 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23616 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23621 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
root 23836 9372 0 12:25 pts/0 00:00:00 grep post
Thanks
Eric
So I tried to follow along and see if his fix would work for me.
I had previously ran /usr/local/nagiosxi/scripts/repair_databases.sh and it never worked, but I ran it again.
Came up with the same errors as usual...
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
/usr/local/nagiosxi/scripts
===============
REPAIR COMPLETE
===============
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
Starting ndo2db: done.
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
Checked my filesystem sizes, but that didn't seem to be a problem.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root 31G 11G 19G 37% /
tmpfs 935M 0 935M 0% /dev/shm
/dev/sda1 477M 75M 377M 17% /boot
/dev/mapper/vg_root-lv_var 23G 3.1G 19G 15% /var
/dev/mapper/vg_root-lv_tmp 976M 1.3M 924M 1% /tmp
/dev/mapper/vg_root-lv_home 1.5G 5.4M 1.4G 1% /home
/dev/mapper/vg_root-lv_apps 5.8G 26M 5.5G 1% /apps
# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_root-lv_root 2.0M 317K 1.7M 16% /
tmpfs 234K 1 234K 1% /dev/shm
/dev/sda1 126K 52 125K 1% /boot
/dev/mapper/vg_root-lv_var 1.5M 413K 1.1M 28% /var
/dev/mapper/vg_root-lv_tmp 64K 25 64K 1% /tmp
/dev/mapper/vg_root-lv_home 96K 500 96K 1% /home
/dev/mapper/vg_root-lv_apps 384K 970 384K 1% /apps
ran the postgresql restart
# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
greped the processes for post, but if you needed to see everything, I'll paste the whole thing here later.
# ps -ef | grep post
postgres 19719 1 0 12:10 ? 00:00:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 19763 19719 0 12:10 ? 00:00:00 postgres: logger process
postgres 19765 19719 0 12:10 ? 00:00:00 postgres: writer process
postgres 19766 19719 0 12:10 ? 00:00:00 postgres: wal writer process
postgres 19767 19719 0 12:10 ? 00:00:00 postgres: autovacuum launcher process
postgres 19768 19719 0 12:10 ? 00:00:00 postgres: stats collector process
postgres 19820 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19918 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20002 19719 0 12:11 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20113 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20188 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20263 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20271 19719 0 12:12 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 20389 19719 0 12:13 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23609 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23611 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23615 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23616 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 23621 19719 0 12:25 ? 00:00:00 postgres: nagiosxi nagiosxi [local] idle
root 23836 9372 0 12:25 pts/0 00:00:00 grep post
Thanks
Eric