Nagios XI 5.2.3 fresh install on CentOS7 fails
Posted: Mon Dec 14, 2015 7:38 pm
Fresh minimal install of CentOS 7
2Gig ram, 2 cores VM
yum update
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.1.1503 (Core)
install nagiosxi 5.2.3
I tried installing twice, both times same exact problem.
1) Installation went fine without errors.
2) When logging in it says database connection failed and asked to run repair script
3) After repair script is run, can login in without error.
4) Everything seems to be fine but noticed postgresql service is not running.
5) Ran initdb as recommended, postgrestql service started fine. So the DB creation portion failed during installation.
MySQL repair log
2Gig ram, 2 cores VM
yum update
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.1.1503 (Core)
install nagiosxi 5.2.3
I tried installing twice, both times same exact problem.
1) Installation went fine without errors.
2) When logging in it says database connection failed and asked to run repair script
3) After repair script is run, can login in without error.
4) Everything seems to be fine but noticed postgresql service is not running.
5) Ran initdb as recommended, postgrestql service started fine. So the DB creation portion failed during installation.
MySQL repair log
Code: Select all
[root@localhost nagiosxi]# systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled)
Active: failed (Result: exit-code) since Tue 2015-12-15 07:52:56 MYT; 2min 24s ago
Process: 6904 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
Dec 15 07:52:56 localhost.localdomain systemd[1]: Starting PostgreSQL database server...
Dec 15 07:52:56 localhost.localdomain postgresql-check-db-dir[6904]: "/var/lib/pgsql/data" is missing or empty.
Dec 15 07:52:56 localhost.localdomain postgresql-check-db-dir[6904]: Use "postgresql-setup initdb" to initialize the database cluster.
Dec 15 07:52:56 localhost.localdomain postgresql-check-db-dir[6904]: See /usr/share/doc/postgresql-9.2.14/README.rpm-dist for more information.
Dec 15 07:52:56 localhost.localdomain systemd[1]: postgresql.service: control process exited, code=exited status=1
Dec 15 07:52:56 localhost.localdomain systemd[1]: Failed to start PostgreSQL database server.
Dec 15 07:52:56 localhost.localdomain systemd[1]: Unit postgresql.service entered failed state.
[root@localhost nagiosxi]# ls -l /var/lib/pgsql/data
total 0
[root@localhost nagiosxi]# postgresql-setup initdb
Initializing database ... OK
[root@localhost nagiosxi]# systemctl start postgresql.service
[root@localhost nagiosxi]# systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled)
Active: active (running) since Tue 2015-12-15 07:56:55 MYT; 3s ago
Process: 9273 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
Process: 9266 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 9276 (postgres)
CGroup: /system.slice/postgresql.service
ââ9276 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
ââ9277 postgres: logger process
ââ9279 postgres: checkpointer process
ââ9280 postgres: writer process
ââ9281 postgres: wal writer process
ââ9282 postgres: autovacuum launcher process
ââ9283 postgres: stats collector process
Dec 15 07:56:54 localhost.localdomain systemd[1]: Starting PostgreSQL database server...
Dec 15 07:56:55 localhost.localdomain systemd[1]: Started PostgreSQL database server.
[root@localhost nagiosxi]# ls -l /var/lib/pgsql/data
total 48
drwx------. 5 postgres postgres 38 Dec 15 07:55 base
drwx------. 2 postgres postgres 4096 Dec 15 07:56 global
drwx------. 2 postgres postgres 17 Dec 15 07:55 pg_clog
-rw-------. 1 postgres postgres 4232 Dec 15 07:55 pg_hba.conf
-rw-------. 1 postgres postgres 1636 Dec 15 07:55 pg_ident.conf
drwx------. 2 postgres postgres 31 Dec 15 07:56 pg_log
drwx------. 4 postgres postgres 34 Dec 15 07:55 pg_multixact
drwx------. 2 postgres postgres 17 Dec 15 07:56 pg_notify
drwx------. 2 postgres postgres 6 Dec 15 07:55 pg_serial
drwx------. 2 postgres postgres 6 Dec 15 07:55 pg_snapshots
drwx------. 2 postgres postgres 24 Dec 15 08:08 pg_stat_tmp
drwx------. 2 postgres postgres 17 Dec 15 07:55 pg_subtrans
drwx------. 2 postgres postgres 6 Dec 15 07:55 pg_tblspc
drwx------. 2 postgres postgres 6 Dec 15 07:55 pg_twophase
-rw-------. 1 postgres postgres 4 Dec 15 07:55 PG_VERSION
drwx------. 3 postgres postgres 58 Dec 15 07:55 pg_xlog
-rw-------. 1 postgres postgres 19845 Dec 15 07:55 postgresql.conf
-rw-------. 1 postgres postgres 57 Dec 15 07:56 postmaster.opts
-rw-------. 1 postgres postgres 91 Dec 15 07:56 postmaster.pid
[root@localhost nagiosxi]#
[root@localhost nagiosxi]# psql nagiosxi nagiosxi
psql: FATAL: Peer authentication failed for user "nagiosxi"