Page 1 of 2

Nagios XI installation issue

Posted: Wed Feb 11, 2015 8:30 am
by JakeHatMacys
So attempting to stand up a new XI server and getting the following error:

Code: Select all

================================================================================
 Package         Arch     Version      Repository                          Size
================================================================================
Updating:
 nagiosxi-deps   noarch   2014r2.5-1   /nagiosxi-deps-2014r2.5-1.noarch   0.0

Transaction Summary
================================================================================
Upgrade       1 Package(s)

Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
graphviz is needed by nagiosxi-deps-2014r2.5-1.noarch
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
nagiosxi-deps-2014r2.3-1.noarch has missing requires of graphviz
Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx-2015-02-11-08-25Yia2lH.yumtx
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: './1-prereqs'
Thoughts?

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 10:17 am
by scottwilkerson
Your error is certainly strange, it is trying to install nagiosxi-deps-2014r2.5-1.noarch but the error states

Code: Select all

nagiosxi-deps-2014r2.3-1.noarch has missing requires of graphviz
These are 2 different versions...

Can you list your install directory

Code: Select all

ls -l /tmp/nagiosxi
and run the following

Code: Select all

yum list installed |grep nagiosxi

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 10:28 am
by JakeHatMacys
scottwilkerson wrote:Your error is certainly strange, it is trying to install nagiosxi-deps-2014r2.5-1.noarch but the error states

Code: Select all

nagiosxi-deps-2014r2.3-1.noarch has missing requires of graphviz
These are 2 different versions...

Can you list your install directory

Code: Select all

ls -l /tmp/nagiosxi
and run the following

Code: Select all

yum list installed |grep nagiosxi
1)

Code: Select all

[root@esu2v238 ~]# ls -l /tmp/nagiosxi
total 292
-rwxr-xr-x  1 root root  6870 Jan 26 18:35 0-repos
-rwxr-xr-x  1 root root   513 Jan 26 18:35 10-phplimits
-rwxr-xr-x  1 root root   490 Jan 26 18:35 11-sourceguardian
-rwxr-xr-x  1 root root   501 Jan 26 18:35 12-mrtg
-rwxr-xr-x  1 root root   211 Jan 26 18:35 13-cacti
-rwxr-xr-x  1 root root   589 Jan 26 18:35 14-timezone
-rwxr-xr-x  1 root root  2068 Jan 26 18:35 1-prereqs
-rwxr-xr-x  1 root root  1191 Jan 26 18:35 2-usersgroups
-rwxr-xr-x  1 root root   711 Jan 26 18:35 3-dbservers
-rwxr-xr-x  1 root root   394 Jan 26 18:35 4-services
-rwxr-xr-x  1 root root   375 Jan 26 18:35 5-sudoers
-rwxr-xr-x  1 root root  1012 Jan 26 18:35 6-firewall
-rwxr-xr-x  1 root root   208 Jan 26 18:35 7-sendmail
-rwxr-xr-x  1 root root   419 Jan 26 18:35 8-selinux
-rwxr-xr-x  1 root root   572 Jan 26 18:35 9-dbbackups
-rwxr-xr-x  1 root root   504 Jan 26 18:35 A-subcomponents
-rwxr-xr-x  1 root root  4159 Jan 26 18:35 B-installxi
-rwxr-xr-x  1 root root   701 Jan 26 18:35 build-perms-bin
-rwxr-xr-x  1 root root   559 Jan 26 18:35 C-cronjobs
-rw-r--r--  1 root root    70 Jan 26 18:35 cpan
-rwxr-xr-x  1 root root  1049 Jan 26 18:35 D-chkconfigalldaemons
-rwxr-xr-x  1 root root  4163 Jan 26 18:35 E-importnagiosql
-rwxr-xr-x  1 root root  2135 Jan 26 18:35 fedoramods
-rwxr-xr-x  1 root root   223 Jan 26 18:35 fix-nagiosadmin
-rwxr-xr-x  1 root root   301 Jan 26 18:35 F-startdaemons
-rwxr-xr-x  1 root root  5001 Jan 26 18:35 fullinstall
-rwxr-xr-x  1 root root  2017 Jan 26 18:35 functions.sh
-rwxr-xr-x  1 root root  1830 Jan 26 18:35 get-os-info
-rwxr-xr-x  1 root root   144 Jan 26 18:35 get-version
-rwxr-xr-x  1 root root   930 Jan 26 18:35 init-auditlog
-rwxr-xr-x  1 root root  1939 Jan 26 18:35 init-mysql
-rwxr-xr-x  1 root root  1442 Jan 26 18:35 init-postgres
-rwxr-xr-x  1 root root  1463 Jan 26 18:35 init.sh
-rwxr-xr-x  1 root root  2930 Jan 26 18:35 init-xidb
-rwxr-xr-x  1 root root   295 Jan 26 18:35 install-2012-prereqs
-rwxr-xr-x  1 root root   141 Jan 26 18:35 install-core4beta
-rw-r--r--  1 root root     0 Feb 11 08:25 installed.repos
-rwxr-xr-x  1 root root  3218 Jan 26 18:35 install-html
-rw-r--r--  1 root root  3152 Feb 11 08:25 install.log
-rwxr-xr-x  1 root root   264 Jan 26 18:35 install-nagiosxi-init
-rwxr-xr-x  1 root root   412 Jan 26 18:35 install-pnptemplates
-rwxr-xr-x  1 root root   830 Jan 26 18:35 install-sourceguardian-extension.sh
-rwxr-xr-x  1 root root   621 Jan 26 18:35 install-sudoers
-rwxr-xr-x  1 root root   644 Jan 26 18:35 install-templates
drwxr-xr-x  2 root root  4096 Jan 26 18:35 licenses
drwxr-xr-x  3 root root  4096 Jan 26 18:35 nagiosxi
-rw-r--r--  1 root root  2751 Jan 26 18:36 nagiosxi-deps-2014r2.5-1.noarch.rpm
-rw-r--r--  1 root root  2767 Jan 26 18:36 nagiosxi-deps-el7-2014r2.5-1.noarch.rpm
drwxr-xr-x  2 root root  4096 Feb 11 08:25 packages
-rw-r--r--  1 root root  5209 Jan 26 18:35 rpminstall
-rw-r--r--  1 root root  2459 Jan 26 18:35 rpmupgrade
drwxr-xr-x  2 root root  4096 Jan 26 18:35 sourceguardian
drwxr-xr-x 19 root root  4096 Jan 26 18:35 subcomponents
drwxr-xr-x  2 root root  4096 Jan 26 18:35 tools
-rwxr-xr-x  1 root root   672 Jan 26 18:35 uninstall-crontab-nagios
-rwxr-xr-x  1 root root   699 Jan 26 18:35 uninstall-crontab-root
-rwxr-xr-x  1 root root 23142 Jan 26 18:35 upgrade
-rw-r--r--  1 root root  7316 Jan 26 18:36 verify-prereqs.php
drwxr-xr-x  3 root root  4096 Jan 26 18:35 vmsetup
-rw-r--r--  1 root root  6405 Feb 11 08:25 xi-sys.cfg
-rwxr-xr-x  1 root root   608 Jan 26 18:35 xivar
-rwxr-xr-x  1 root root   323 Jan 26 18:35 Z-webroot
2)

[root@esu2v238 ~]# yum list installed |grep nagiosxi
nagiosxi-deps.noarch 2014r2.3-1 @/nagiosxi-deps-2014r2.3-1.noarch

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 10:31 am
by JakeHatMacys
I did try the install on this box in the past on probably the previous version before we had our firewall issue sorted. Supposing we need to clean out anything that may have been put in place previously???

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 10:40 am
by abrist
JakeHatMacys wrote: Supposing we need to clean out anything that may have been put in place previously???
Yep, though you may have issues if the users and dbs were already created - the script may bail out.

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 10:52 am
by JakeHatMacys
abrist wrote:
JakeHatMacys wrote: Supposing we need to clean out anything that may have been put in place previously???
Yep, though you may have issues if the users and dbs were already created - the script may bail out.
Install doc doesn't really have a clean house command. Is there a good wipe out kinda like the upgrade docs:

rm -rf nagiosxi xi*.tar.gz

???

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 11:02 am
by abrist
It all depends where the script failed previously. The biggest issues I have seen in the past are users preexisting when the script assumes they will not be, and databases/tables created when the script assumes the should not be. I would suggest running the install and then posting why it failed here.

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 12:57 pm
by JakeHatMacys
abrist wrote:It all depends where the script failed previously. The biggest issues I have seen in the past are users preexisting when the script assumes they will not be, and databases/tables created when the script assumes the should not be. I would suggest running the install and then posting why it failed here.
Isn't that in the 1st post?

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 1:10 pm
by JakeHatMacys
So I went and grabbed the old release I tried to install initially which is: xi-2014r2.3.tar
I got a bit farther but failed here:

Code: Select all

----------------------------------------------------------------
gcc  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -Winline -W -DHAVE_CONFIG_H -c ./src/rateup.c -o bin/rateup.o
./src/rateup.c: In function âupdateâ:
./src/rateup.c:1590: warning: comparison between signed and unsigned integer expressions
./src/rateup.c:1627: warning: comparison between signed and unsigned integer expressions
./src/rateup.c:1664: warning: comparison between signed and unsigned integer expressions
./src/rateup.c:1701: warning: comparison between signed and unsigned integer expressions
gcc bin/rateup.o -o bin/rateup   -lgd -lpng -lz  -lm
/usr/bin/perl -0777 -p -i~ -e "s'^#!\s*/\S*perl'#! /usr/bin/perl'" ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@GRAPHFMT="png";@' ./bin/mrtg ./bin/indexmaker
/usr/bin/perl -0777 -p -i~ -e "s'^#!\s*/\S*perl'#! /usr/bin/perl'" ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@GRAPHFMT="png";@' ./bin/mrtg ./bin/indexmaker
/bin/sh ./mkinstalldirs /usr/bin
for x in ./bin/mrtg ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg-traffic-sum; do \
          /usr/bin/install -c -m 755 $x /usr/bin; done
for x in bin/rateup; do \
          /usr/bin/install -c -m 755 $x /usr/bin; done
/bin/sh ./mkinstalldirs /usr/lib/mrtg2/Pod
for x in ./lib/mrtg2/*.pm; do \
          /usr/bin/install -c -m 644 $x /usr/lib/mrtg2; done
for x in ./lib/mrtg2/Pod/*.pm; do \
          /usr/bin/install -c -m 644 $x /usr/lib/mrtg2/Pod; done
/bin/sh ./mkinstalldirs /usr/share/mrtg2/icons
for x in ./images/*.gif ./images/*.png; do \
          /usr/bin/install -c -m 644 $x /usr/share/mrtg2/icons; done
/bin/sh ./mkinstalldirs /usr/share/doc/mrtg2
(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS doc/*.pod doc/*.txt doc/*.png; do \
          /usr/bin/install -c -m 644 $x /usr/share/doc/mrtg2; done)
/bin/sh ./mkinstalldirs /usr/share/man/man1
for x in ./doc/*.1; do \
          /usr/bin/install -c -m 644 $x /usr/share/man/man1; done
MRTG-POST
MRTG installed OK
Subcomponent 'mrtg' installed OK
Subcomponents installed OK
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR:  role "nagiosxi" already exists
ERROR:  database "nagiosxi" already exists
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'

Re: Nagios XI installation issue

Posted: Wed Feb 11, 2015 2:41 pm
by lmiltchev
The "fullinstall" scripts needs to be run on a "clean" system. The problem is that you have some elements of XI installed already:
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
There is a script in the "/usr/local/nagiosxi/scripts/" directory that you can run if you want to completely uninstall Nagios XI and start clean but you didn't get so far.

In any case, you can run some of the commands from the script to remove old traces of XI. I am posting the "uninstall_xi.sh" below:

Code: Select all

#!/bin/sh

## UNINSTALL NOTICE #########################################

fmt -s -w $(tput cols) <<-EOF
        ==================================
        !! DESTRUCTIVE UNINSTALL NOTICE !!
        ==================================
        WARNING: This script will uninstall

        Nagios
        MySql
        Postgresql

        from this system as well as all data associated with these services.
        This action is irreversible and will result in the removal of
        all Nagios databases, configuration files, log files, and services.

EOF

read -p "Are you sure you want to continue? [y/N] " res

if [ "$res" = "y" -o "$res" = "Y" ]; then
        echo "Proceeding with uninstall..."
else
        echo "Uninstall cancelled"
        exit 1
fi

# Stop services
echo "Stopping services..."
service nagios stop
service npcd stop
service ndo2db stop

# Remove init.d files
echo "removing init files..."
rm -rf /etc/init.d/nagios
rm -rf /etc/init.d/npcd
rm -rf /etc/init.d/ndo2db

# Remove users and sudoers
echo "Removing users and suduoers..."
userdel -r nagios
groupdel nagcmd
rm -f /etc/sudoers.d/nagiosxi

# Remove crontabs
echo "Removing crontabs..."
rm -f /etc/cron.d/nagiosxi

# Remove various files
echo "Removing files..."
rm -rf /usr/local/nagios
rm -rf /usr/local/nagiosxi
# Remove NagiosQL files
echo "Removing NagiosQL files..."
rm -rf /etc/nagiosql
rm -rf /var/www/html/nagiosql
rm -rf /var/lib/mysql
rm -rf /var/lib/pgsql
# Not going to do this as it may contain your only backup
#rm -rf /store/backups
# Remove Apache configs
echo "Removing Apache configs..."
rm -f /etc/httpd/conf.d/nagios.conf
rm -f /etc/httpd/conf.d/nagiosxi.conf
rm -f /etc/httpd/conf.d/nagiosql.conf
rm -f /etc/httpd/conf.d/nrdp.conf
rm -f /usr/local/nrdp/nrdp.conf
service httpd restart
# Remove xinetd configs
echo "Removing xinetd configs..."
rm -f /etc/xinetd.d/nrpe
rm -f /etc/xinetd.d/nsca
rm -f /etc/xinetd.d/nrdp
service xinetd restart
# Remove Postgres databases
echo "Removing Postgres and mysql databases..."
yum remove mysql postgresql -y
# Remove DB backup scripts
echo "Removing database backup scripts..."
rm -f /root/scripts/automysqlbackup
rm -f /root/scripts/autopostgresqlbackup
(
cd /tmp
rm -rf nagiosxi xi*.tar.gz
)


fmt -s -w $(tput cols) <<-EOF
        ====================
        UNINSTALL COMPLETED!
        ====================

EOF
Note: If you are unsure of a command, ask us before running it.