Page 1 of 1

Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 11:35 am
by ALUstweiss
All,

I'm attempting to install XI on a newly configured Red Hat Enterprise Linux Server release 6.3 (Santiago)

Install script progressed fine and dandy until the B-installxi script, at which time it encountered some problems as seen below in the installation output:

Subcomponent 'wkhtml' installed OK
Subcomponents installed OK
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd:
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
CREATE ROLE
CREATE DATABASE
User 'nagiosxi' created successfully.
Database 'nagiosxi' created successfully.
Restarting Postgres...
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
Sleeping for a few seconds (please wait)...
Creating database structure...
ERROR: PostgresQL 'nagiosxi' database schema was not created - exiting.
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './B-installxi'

The interesting bits of the install.log are as follows:
(Note: I re-ran the install script to see if that would help, which is why you see things already existing)

Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
User 'nagiosxi' created successfully.
Database 'nagiosxi' created successfully.
Restarting Postgres...
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
Sleeping for a few seconds (please wait)...
Creating database structure...
ERROR: relation "if_command_id_seq" already exists
ERROR: relation "if_meta_id_seq" already exists
ERROR: relation "if_option_id_seq" already exists
ERROR: relation "if_sysstat_id_seq" already exists
ERROR: relation "if_user_id_seq" already exists
ERROR: relation "if_usermeta_id_seq" already exists
ERROR: relation "xi_commands_command_id_seq" already exists
ERROR: relation "xi_commands" already exists
ERROR: relation "xi_events" already exists
ERROR: relation "xi_events_event_id_seq" already exists
ERROR: relation "xi_meta_meta_id_seq" already exists
ERROR: relation "xi_meta" already exists
ERROR: relation "xi_options_option_id_seq" already exists
ERROR: relation "xi_options" already exists
ERROR: relation "xi_sysstat_sysstat_id_seq" already exists
ERROR: relation "xi_sysstat" already exists
ERROR: relation "xi_usermeta_usermeta_id_seq" already exists
ERROR: relation "xi_usermeta" already exists
ERROR: relation "xi_users_user_id_seq" already exists
ERROR: relation "xi_users" already exists
ERROR: multiple primary keys for table "xi_commands" are not allowed
ERROR: multiple primary keys for table "xi_events" are not allowed
ERROR: multiple primary keys for table "xi_meta" are not allowed
ERROR: multiple primary keys for table "xi_options" are not allowed
ERROR: multiple primary keys for table "xi_sysstat" are not allowed
ERROR: multiple primary keys for table "xi_usermeta" are not allowed
ERROR: relation "xi_usermeta_user_id_key" already exists
ERROR: multiple primary keys for table "xi_users" are not allowed
ERROR: relation "xi_users_username_key" already exists
ERROR: relation "event_time" already exists
ERROR: relation "xi_commands_event_time_idx" already exists
ERROR: relation "xi_meta_keyname_idx" already exists
ERROR: relation "xi_meta_metaobj_id_idx" already exists
ERROR: relation "xi_meta_metatype_id_idx" already exists
ERROR: relation "xi_options_name_idx" already exists
ERROR: relation "xi_sysstat_metric_idx" already exists
ERROR: relation "xi_usermeta_autoload_idx" already exists
ERROR: PostgresQL 'nagiosxi' database schema was not created - exiting.
ERROR: Nagios XI database was not setup properly - exiting.

Thanks!

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 11:55 am
by lmiltchev
Was this a "clean" system? You can try the following:

Download this script, and place it in: "/usr/local/nagiosxi/scripts/" directory, replacing the "original uninstall_xi.sh" file. Make it executable and run it:

Code: Select all

cd /usr/local/nagiosxi/scripts
chmod +x  uninstall_xi.sh
./uninstall_xi.sh 
Go to the "/tmp" directory, re-download Nagios XI, and run the fullinstall:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/2012/xi-2012r1.2.tar.gz
tar zxvf xi-2012r1.2.tar.gz
cd nagiosxi
./fullinstall
If the install fails, please, don't run the "./fullinstall" the 2nd time. Just upload the "install.log", so that we can review it.

Thanks!

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 12:12 pm
by ALUstweiss
Yes It was a completely new install from ground up this morning.

I just downloaded the latest installation setup from the site this morning.

I doubt a reinstall is going to change anything as it simply appears to be failing when doing Postgres work.

Sorry, but how/where do I upload the install log?

Thx!

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 12:25 pm
by ALUstweiss
I just now found the "Upload attachment" tab on the post page.

I'd rather not post the install.log in a public forum due to secure information that can be found therein.

Can I PM or e-mail you the log instead for review?

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 12:59 pm
by lmiltchev
Sure, email us at [email protected]. This will open a new support ticket in our system, and we will take it from there.

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 1:01 pm
by ALUstweiss
Roger, wilco!

Thanks!

Re: Install Help: PostgresQL database schema not created

Posted: Tue Nov 20, 2012 3:02 pm
by lmiltchev
I am locking this post - it is handled via our email ticketing system.