Nagios XI 5.2.3 fresh install on CentOS7 fails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rajasegar »

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
db-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"


install.log.zip
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by Box293 »

In XI 5 we are phasing out the Postgres Database.
Currently when you upgrade from 2014 to 5 the postgres database is still used.
However in a fresh install it does not get used.

The developers are currently working on a migration script for upgraded XI servers so postgres can be removed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rajasegar »

Box293 wrote:In XI 5 we are phasing out the Postgres Database.
Currently when you upgrade from 2014 to 5 the postgres database is still used.
However in a fresh install it does not get used.

The developers are currently working on a migration script for upgraded XI servers so postgres can be removed.
Ok. So all the stuff that went into the Postgres DB goes in the MySQL right?

What about the MySQL DB issue after installation?
Have to repair before it was ok.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by Box293 »

rajasegar wrote:Ok. So all the stuff that went into the Postgres DB goes in the MySQL right?
Correct.
rajasegar wrote:What about the MySQL DB issue after installation?
Have to repair before it was ok.
I run up a lot of test systems and I occasionally see that message right after I define the initial credentials, but I've never had to run the repair script.

If it's happening regularly then I would be concerned.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rajasegar »

Box293 wrote:
rajasegar wrote:Ok. So all the stuff that went into the Postgres DB goes in the MySQL right?
Correct.
rajasegar wrote:What about the MySQL DB issue after installation?
Have to repair before it was ok.
I run up a lot of test systems and I occasionally see that message right after I define the initial credentials, but I've never had to run the repair script.

If it's happening regularly then I would be concerned.
I did 2 fresh installation and both had the same problem

First time it was done without doing the yum update.
Second time it was done after yum update.
So this does not look like related to updated packages in the OS.

The repair log was attached in the initial post together with the nagios installation log.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by tgriep »

After creating the initial login, can you wait a minute and refresh the screen and does the error go away?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rajasegar »

tgriep wrote:After creating the initial login, can you wait a minute and refresh the screen and does the error go away?
Tried again the same thing and this time no DB issues.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by tgriep »

That is good to hear. I think it might be a timing issue. You create the initial account and it tries to use it before it is done being setup fully.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rajasegar »

tgriep wrote:That is good to hear. I think it might be a timing issue. You create the initial account and it tries to use it before it is done being setup fully.
Please close this case.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios XI 5.2.3 fresh install on CentOS7 fails

Post by rkennedy »

I will close this thread out now. Feel free to make a new thread if you ever need assistance in the future!
Former Nagios Employee
Locked