Page 2 of 2

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 2:03 pm
by waynescoffee
Yes. Otherwise the previous installation would have failed completely I think.
#grep proxy /etc/wgetrc
https_proxy = http://www-xxx.xxx.xxx.xx:8080/
http_proxy = http://www-xxx.xxx.xxx.xx:8080/
ftp_proxy = http://www-xxx.xxx.xxx.xx:8080/
# If you do not want to use proxy at all, set this to off.
#use_proxy = on

# grep proxy /etc/yum.conf
proxy=http://www-xxx.xxx.xxx.xx:8080
#

You can see the wget test to google.com below works.
# wget http://www.google.com
--2014-11-17 05:26:11-- http://www.google.com/
Resolving www-xxx.xxx.xxx ...xxx.xxx.xxx.xxx
Connecting to www-xxx.xxx.xxx|xxx.xxx.xxx.xxx|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “index.html”

[ <=> ] 19,404 --.-K/s in 0.003s

2014-11-17 05:26:11 (6.46 MB/s) - “index.html” saved [19404]

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 2:06 pm
by lmiltchev
Did you exclude the localhost in "/etc/wgetrc"?

Code: Select all

no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Hosts to exclude from proxying

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 2:27 pm
by waynescoffee
I checked /etc/wgetrc. There was no localhost proxy exclusion. So I added this line and tested it with wget command. The command looks like it's working. However when I reran the reconfigure script it's still failing. This is because the MySQL nagiosxi DB is still missing

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| test |
+--------------------+
5 rows in set (0.00 sec)

mysql>



=====================================================

# cp /etc/wgetrc /etc/wgetrc_save_111714
# diff /etc/wgetrc /etc/wgetrc_save_111714
81d80
< no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Hosts to exclude from proxying

#/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login
--2014-11-17 05:41:47-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 10,023 --.-K/s in 0.02s

2014-11-17 05:41:48 (613 KB/s) - “nagiosql.login” saved [10023]




./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=emm7ri' -O nagiosql.login--2014-11-17 05:49:07-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 10,021 --.-K/s in 0.02s

2014-11-17 05:49:08 (505 KB/s) - “nagiosql.login” saved [10021]

NAGIOSQL LOGIN FAILED!

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 2:57 pm
by lmiltchev
What you have is exactly what you should see...

Code: Select all

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| test |
+--------------------+
5 rows in set (0.00 sec)
I assume that your install didn't complete successfully because of the proxy issues. As this is a new install, you could try to rerun the fullinstall script and see if this is going to fix the issue.

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 3:16 pm
by waynescoffee
Ok. Thanks for the info about the DB. I tried running the fullinstall again with deinstalling and it failed with the following message:
NAGIOSQL LOGIN FAILED!
From the log file it looks like it failed at the following reconfigure_nagios.sh line of the E-importnagiosql script called by fullinstall
# Reconfigure Nagios with initial configuration import
(cd ./nagiosxi/basedir/scripts; ./reconfigure_nagios.sh)

===========================================================================================
# pwd
/tmp/nagiosxi
]# ./fullinstall
========================
Nagios XI Full Installer
========================

This script will do a complete install of Nagios XI by executing all necessary sub-scripts.

IMPORTANT: This script should only be used on a 'clean' install of CentOS or RedHat. Do NOT use this on
a system that has been tasked with other purposes or has an existing install of Nagios Core. To create
such a clean install you should have selected ONLY the 'Base' package in the OS installer.
Do you want to continue? [Y/n] Y
Proceeding with installation...
Checking MySQL credentials...
Stored MySQL password validated.
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-dbservers'...
Database servers already initialized - skipping.
RESULT=0
Running './4-services'...
/etc/services already updated - skipping.
RESULT=0
Running './5-sudoers'...
sudoers already configured - skipping.
RESULT=0
Running './6-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './7-sendmail'...
Step completed OK
RESULT=0
Running './8-selinux'...
SELinux already configured - skipping.
RESULT=0
Running './9-dbbackups'...
Database backups already configured - skipping.
RESULT=0
Running './10-phplimits'...
PHP limits already configured - skipping.
RESULT=0
Running './11-sourceguardian'...
Sourceguardian already configured - skipping.
RESULT=0
Running './12-mrtg'...
MRTG already configured - skipping.
RESULT=0
Running './13-cacti'...
Step completed OK
RESULT=0
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Nagios XI base files already installed - skipping.
RESULT=0
Running './C-cronjobs'...
Crontabs already configured - skipping.
RESULT=0
Running './D-chkconfigalldaemons'...
Daemons already configured - skipping.
RESULT=0
Running './E-importnagiosql'...
httpd: no process killed
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=emm7ri' -O nagiosql.login--2014-11-17 06:51:27-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

0K ......... 554K=0.02s

2014-11-17 06:51:28 (554 KB/s) - “nagiosql.login” saved [10021]

NAGIOSQL LOGIN FAILED!
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: './E-importnagiosql'
]#


tail -100 install.log
...
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=emm7ri' -O nagiosql.login--2014-11-17 06:51:27-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

0K ......... 554K=0.02s

2014-11-17 06:51:28 (554 KB/s) - “nagiosql.login” saved [10021]

NAGIOSQL LOGIN FAILED!

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 3:31 pm
by lmiltchev
You can try running the uninstall script:

Code: Select all

cd /usr/local/nagiosxi/scripts
chmod +x uninstall_xi.sh
./uninstall_xi.sh
The script may be somewhat outdated. I haven't tested it lately but it should work.

After this, download the latest tarball, untar it, and run the fullinstall. In any case, you need to do the install on a clean system (minimal install). Hope this helps.

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 3:51 pm
by waynescoffee
The uninstall script was run successfully see the output below. Can you please verify if this is the latest tar ball?

wget http://assets.nagios.com/downloads/nagi ... est.tar.gz
--2014-11-17 07:14:32-- http://assets.nagios.com/downloads/nagi ... est.tar.gz
Resolving www-xxx.xxx.xxx... xxx.xxx.xxx.xxx
Connecting to www-xxx.xxx.xxx |xxx.xxx.xxx.xxx|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 40416130 (39M) [application/x-gzip]
Saving to: “xi-latest.tar.gz”

100%[=====================================================================>] 40,416,130 16.1M/s in 2.4s

2014-11-17 07:14:35 (16.1 MB/s) - “xi-latest.tar.gz” saved [40416130/40416130]

# ls -ltr /tmp/xi-latest.tar.gz
-rw-r--r--. 1 root root 40416130 Nov 11 09:53 /tmp/xi-latest.tar.gz
# cksum /tmp/xi-latest.tar.gz
3304393585 40416130 /tmp/xi-latest.tar.gz




============================================================================
Uninstall output:

./uninstall_xi.sh
==================================
!! 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.

Are you sure you want to continue? [y/N] y
Proceeding with uninstall...
Stopping services...
Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
rm: cannot remove `/usr/local/nagiosxi/var/subsys/npcd.pid': No such file or directory
NPCD was not running.
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
removing init files...
Removing users and suduoers...
userdel: user nagios is currently logged in
Removing crontabs...
Removing files...
Removing NagiosQL files...
Removing Apache configs...
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
Removing xinetd configs...
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Removing Postgres and mysql databases...
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-3.el6_5 will be erased
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-server-5.1.73-3.el6_5.x86_64
--> Processing Dependency: mysql for package: nagiosxi-deps-2014r2.0-1.noarch
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-devel-5.1.73-3.el6_5.x86_64
---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be erased
--> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-devel-8.4.20-1.el6_5.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-3.el6_5 will be erased
---> Package mysql-server.x86_64 0:5.1.73-3.el6_5 will be erased
--> Processing Dependency: mysql-server for package: akonadi-1.2.1-2.el6.x86_64
---> Package nagiosxi-deps.noarch 0:2014r2.0-1 will be erased
---> Package postgresql-devel.x86_64 0:8.4.20-1.el6_5 will be erased
---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be erased
--> Running transaction check
---> Package akonadi.x86_64 0:1.2.1-2.el6 will be erased
--> Processing Dependency: libakonadiprotocolinternals.so.1()(64bit) for package: kdepimlibs-akonadi-4.3.4-4.el6.x86_64
--> Processing Dependency: libakonadiprotocolinternals.so.1()(64bit) for package: kdepim-runtime-4.3.4-5.el6.x86_64
--> Processing Dependency: libakonadiprotocolinternals.so.1()(64bit) for package: kdepim-runtime-libs-4.3.4-5.el6.x86_64
--> Processing Dependency: akonadi(x86-64) >= 1.2.0 for package: kdepimlibs-akonadi-4.3.4-4.el6.x86_64
--> Processing Dependency: akonadi(x86-64) >= 1.2.1 for package: kdepim-runtime-libs-4.3.4-5.el6.x86_64
--> Running transaction check
---> Package kdepim-runtime.x86_64 0:4.3.4-5.el6 will be erased
---> Package kdepim-runtime-libs.x86_64 0:4.3.4-5.el6 will be erased
---> Package kdepimlibs-akonadi.x86_64 0:4.3.4-4.el6 will be erased
--> Processing Dependency: libakonadi-kde.so.4()(64bit) for package: 6:kdepim-4.3.4-6.el6.x86_64
--> Running transaction check
---> Package kdepim.x86_64 6:4.3.4-6.el6 will be erased
--> Processing Dependency: kdepim = 6:4.3.4-6.el6 for package: 6:kdepim-libs-4.3.4-6.el6.x86_64
--> Running transaction check
---> Package kdepim-libs.x86_64 6:4.3.4-6.el6 will be erased
--> Finished Dependency Resolution
base | 3.7 kB 00:00
cr | 3.3 kB 00:00
epel/metalink | 14 kB 00:00
extras | 3.4 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00

Dependencies Resolved

===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Removing:
mysql x86_64 5.1.73-3.el6_5 @base 2.4 M
postgresql x86_64 8.4.20-1.el6_5 @base 14 M
Removing for dependencies:
akonadi x86_64 1.2.1-2.el6 @anaconda-CentOS-201311272149.x86_64/6.5 1.8 M
kdepim x86_64 6:4.3.4-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 21 M
kdepim-libs x86_64 6:4.3.4-6.el6 @anaconda-CentOS-201311272149.x86_64/6.5 20 M
kdepim-runtime x86_64 4.3.4-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 3.2 M
kdepim-runtime-libs x86_64 4.3.4-5.el6 @anaconda-CentOS-201311272149.x86_64/6.5 834 k
kdepimlibs-akonadi x86_64 4.3.4-4.el6 @anaconda-CentOS-201311272149.x86_64/6.5 1.2 M
mysql-devel x86_64 5.1.73-3.el6_5 @base 388 k
mysql-server x86_64 5.1.73-3.el6_5 @base 25 M
nagiosxi-deps noarch 2014r2.0-1 @/nagiosxi-deps-2014r2.0-1.noarch 0.0
postgresql-devel x86_64 8.4.20-1.el6_5 @base 3.4 M
postgresql-server x86_64 8.4.20-1.el6_5 @base 15 M

Transaction Summary
===============================================================================================================
Remove 13 Package(s)

Installed size: 108 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : nagiosxi-deps-2014r2.0-1.noarch 1/13
Erasing : kdepim-runtime-libs-4.3.4-5.el6.x86_64 2/13
Erasing : kdepim-runtime-4.3.4-5.el6.x86_64 3/13
Erasing : 6:kdepim-libs-4.3.4-6.el6.x86_64 4/13
Erasing : 6:kdepim-4.3.4-6.el6.x86_64 5/13
Erasing : mysql-devel-5.1.73-3.el6_5.x86_64 6/13
Erasing : kdepimlibs-akonadi-4.3.4-4.el6.x86_64 7/13
Erasing : akonadi-1.2.1-2.el6.x86_64 8/13
Erasing : mysql-server-5.1.73-3.el6_5.x86_64 9/13
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
Erasing : postgresql-devel-8.4.20-1.el6_5.x86_64 10/13
Erasing : postgresql-server-8.4.20-1.el6_5.x86_64 11/13
Erasing : postgresql-8.4.20-1.el6_5.x86_64 12/13
Erasing : mysql-5.1.73-3.el6_5.x86_64 13/13
Verifying : mysql-devel-5.1.73-3.el6_5.x86_64 1/13
Verifying : kdepim-runtime-4.3.4-5.el6.x86_64 2/13
Verifying : akonadi-1.2.1-2.el6.x86_64 3/13
Verifying : nagiosxi-deps-2014r2.0-1.noarch 4/13
Verifying : postgresql-server-8.4.20-1.el6_5.x86_64 5/13
Verifying : kdepim-runtime-libs-4.3.4-5.el6.x86_64 6/13
Verifying : mysql-server-5.1.73-3.el6_5.x86_64 7/13
Verifying : mysql-5.1.73-3.el6_5.x86_64 8/13
Verifying : postgresql-devel-8.4.20-1.el6_5.x86_64 9/13
Verifying : 6:kdepim-4.3.4-6.el6.x86_64 10/13
Verifying : kdepimlibs-akonadi-4.3.4-4.el6.x86_64 11/13
Verifying : postgresql-8.4.20-1.el6_5.x86_64 12/13
Verifying : 6:kdepim-libs-4.3.4-6.el6.x86_64 13/13

Removed:
mysql.x86_64 0:5.1.73-3.el6_5 postgresql.x86_64 0:8.4.20-1.el6_5

Dependency Removed:
akonadi.x86_64 0:1.2.1-2.el6 kdepim.x86_64 6:4.3.4-6.el6
kdepim-libs.x86_64 6:4.3.4-6.el6 kdepim-runtime.x86_64 0:4.3.4-5.el6
kdepim-runtime-libs.x86_64 0:4.3.4-5.el6 kdepimlibs-akonadi.x86_64 0:4.3.4-4.el6
mysql-devel.x86_64 0:5.1.73-3.el6_5 mysql-server.x86_64 0:5.1.73-3.el6_5
nagiosxi-deps.noarch 0:2014r2.0-1 postgresql-devel.x86_64 0:8.4.20-1.el6_5
postgresql-server.x86_64 0:8.4.20-1.el6_5

Complete!
Removing database backup scripts...
====================
UNINSTALL COMPLETED!
====================

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 3:59 pm
by abrist
The latest one should be 2.0. You can download it from:
http://assets.nagios.com/downloads/nagi ... 2.0.tar.gz

Re: NAGIOS XI new install issue

Posted: Mon Nov 17, 2014 4:54 pm
by waynescoffee
OK. Thanks. I compared the cksum of the two packages they are the same package.

#cksum /var/tmp/xi-2014r2.0.tar.gz
3304393585 40416130 /var/tmp/xi-2014r2.0.tar.gz
#cksum /tmp/xi-latest.tar.gz
3304393585 40416130 /tmp/xi-latest.tar.gz

I successfully ran the fullinstall after the uninstall. I saw some messages at the end related to npcd.pid but otherwise it appears to be a clean install. And when I brought up nagiosxi GUI now the 6 system status circles on the top RH corner show green. Thank you all for your help.

....
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
Starting nagios: done.
Login appears okay
Cookies appear okay
import appear okay
export appear okay

NagiosQL data imported OK.
RESULT=0
Running './F-startdaemons'...
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
ndo2db was not running... could not stop
Starting ndo2db: done.
Running configuration check...done.
Stopping nagios: ..done.
Starting nagios: done.
rm: cannot remove `/usr/local/nagiosxi/var/subsys/npcd.pid': No such file or directory
NPCD was not running.
NPCD started.
Stopping crond: [ OK ]
Starting crond: [ OK ]
Daemons started OK
RESULT=0
Running './Z-webroot'...
RESULT=0

Nagios XI Installation Complete!

You can access the Nagios XI web interface by visiting:
http:///nagiosxi/