Nagios xi Manual Installation

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
jengstro
Posts: 8
Joined: Tue Nov 30, 2010 6:51 pm

Nagios xi Manual Installation

Post by jengstro »

After running through all the scripts the web interface displays the following message...

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

Ive used Nagios for years but xi is new to me. Any ideas would be a great help.

Thanks!
-Jeff
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi Manual Installation

Post by mguthrie »

This error means that either postgresql didn't get installed correctly or it isn't running on the service.

Try:
service postgresql restart

And then try logging in again. Most of the time this resolves the issue. If not then it may not have installed correctly. If you have problems after restarting postgres send us the following info:

Linux Distro?
32 or 64bit?
Are you using a proxy? http://support.nagios.com/wiki/index.ph ... th_Proxies
Did you run the installer from the /tmp directory? If not then re-run the scripts from this directory.
jengstro
Posts: 8
Joined: Tue Nov 30, 2010 6:51 pm

Re: Nagios xi Manual Installation

Post by jengstro »

Linux Distro?= Centos 5.5
32 or 64bit?= 32
Are you using a proxy?= No
Did you run the installer from the /tmp directory?= So move the nagiosxi directory to tmp and run again?

I noticed when trying to restart postgresql that it complained about pg_log already existing... here are the steps I went through to get postgresql running but the webadmin site still fails to connect.

Code: Select all

[root@FAFHRD nagiosxi]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [FAILED]
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
                                                           [FAILED]
Starting postgresql service:                               [FAILED]

[root@FAFHRD nagiosxi]# ls -al /var/lib/pgsql/data/
total 16
drwx------ 3 postgres postgres 4096 Dec  1 17:08 .
drwx------ 4 postgres postgres 4096 Nov 30 17:08 ..
-rwxr-xr-x 1 root     root     3358 Nov 30 18:36 pg_hba.conf
drwx------ 2 postgres postgres 4096 Dec  1 17:08 pg_log
-rw-r--r-- 1 root     root        0 Nov 30 15:10 post
-rw-r--r-- 1 root     root        0 Nov 30 15:11 postgresql.conf
[root@FAFHRD nagiosxi]# mv /var/lib/pgsql/data/* /home/jengstro/
[root@FAFHRD nagiosxi]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [FAILED]
Initializing database:                                     [  OK  ]
Starting postgresql service:                               [  OK  ]
Thanks!
jengstro
Posts: 8
Joined: Tue Nov 30, 2010 6:51 pm

Re: Nagios xi Manual Installation

Post by jengstro »

Tried running the scripts from /tmp/nagiosxi/ but I am still running into the same issue. Here is what the script said...

Code: Select all

PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: FATAL:  Ident authentication failed for user "nagiosxi" in /tmp/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-postgres64.inc.php on line 676
        DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!

Thanks!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi Manual Installation

Post by mguthrie »

Do you by chance have gnome installed on your CentOS server? We just ran a test install today on CentOS 5.5 with gnome and discovered that the path variable for /sbin/service is different from CentOS without gnome. If you're running these with gnome installed let us know and we'll send you the fix to run before running the installer scripts.
jengstro
Posts: 8
Joined: Tue Nov 30, 2010 6:51 pm

Re: Nagios xi Manual Installation

Post by jengstro »

mguthrie wrote:Do you by chance have gnome installed on your CentOS server? We just ran a test install today on CentOS 5.5 with gnome and discovered that the path variable for /sbin/service is different from CentOS without gnome. If you're running these with gnome installed let us know and we'll send you the fix to run before running the installer scripts.
Gnome is installed.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi Manual Installation

Post by mguthrie »

OK, the short solution is to install xi on a CentOS server without a GUI (which is what most of our users use). In the meantime we'll try and run through a test install today and get you the fixes for installing with gnome.
jengstro
Posts: 8
Joined: Tue Nov 30, 2010 6:51 pm

Re: Nagios xi Manual Installation

Post by jengstro »

You guys ever get the install to work with CentOS running Gnome? -Thanks!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi Manual Installation

Post by mguthrie »

The problem we identified with gnome was that the PATH for the "service" command gets changed under gnome. This needs to be set correctly so that the scripts starting with 3-dbservers will run correctly.

You can test if the path is set correctly by trying the following commands:

Code: Select all

service httpd restart
service postgresql restart

I'll have to double check see if there were any other issues when gnome is installed. I would also double check to see if postgresql and mysql install correctly after the 1-prereqs scripts.
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Nagios xi Manual Installation

Post by mocjack »

What should the correct path be?