Page 1 of 2
NagiosXI Install error
Posted: Wed Dec 14, 2011 6:53 am
by tohariganesh
Hi,
I am trying to install NagiosXI as per the below documentation.
http://assets.nagios.com/downloads/n...structions.pdf
However its failing in this step:
./E-importnagiosql
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
Not sure how to proceed from here. Any help is appreciated.
Thanks
HG
Edit/Delete Message
Re: NagiosXI Install error
Posted: Wed Dec 14, 2011 11:53 am
by scottwilkerson
HG,
Not sure what the instructions you were following because your link was cut off.
The current install instructions can be found at
http://assets.nagios.com/downloads/nagi ... ctions.pdf
That being said, if this was what was followed, can we have a bit more information about your setup.
For all support requests, we need to know:
Linux Distribution and version?
32 or 64bit?
VMware Image or Manual Install of XI?
Are there specials configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
Thanks.
Re: NagiosXI Install error
Posted: Tue Dec 20, 2011 12:50 am
by tohariganesh
Hi Scott,
Thanks for responding.
I am installing Nagios XI manually on a Linux 64bit system. Its a VM machine hosted on an ESXI server.
[root@nagios-dev1 nagiosxi]# uname -a
Linux nagios-dev1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Yes,the machine is in Intranet and hence has a proxy.
SSL is not enabled.
Let me know if you want more info. Expecting your early response.
Note - I had a Nagios core 3.2 installed on this system. And i was trying to install XI on it. I was debuugging the error mentioned in my earlier mail and i realise that XI is trying to import config of nagios core-3.2.3.
Pasting the install log for more info
Code: Select all
[root@nagios-dev1 backup]# cd /tmp/nagiosxi/
[root@nagios-dev1 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.
Do you want to continue? [Y/n] y
Proceeding with installation...
Checking MySQL credentials...
Enter the MySQL root password to continue...
MySQL Root Password: nagiosxi
Password validated.
Running './0-yum noupdate'...
Yum already configured - exiting.
RESULT=0
Running './1-prereqs'...
Pre-reqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run 'yum update'
Prerequisite program 'sed' found at /bin/sed
Prerequisite program 'ping' found at /bin/ping
Prerequisite program 'wget' found at /usr/bin/wget
Prerequisite program 'php' found at /usr/bin/php
Prerequisite program 'mrtg' found at /usr/bin/mrtg
Prerequisite program 'pear' found at /usr/bin/pear
Prerequisite program 'httpd' found at /usr/sbin/httpd
Prerequisite program 'psql' found at /usr/bin/psql
Prerequisite program 'mysql' found at /usr/bin/mysql
Prerequisite program 'mysqladmin' found at /usr/bin/mysqladmin
Pre-requisites installed OK
RESULT=0
Running './2-usersgroups'...
useradd: user nagios exists
groupadd: group nagios exists
groupadd: group nagcmd exists
Adding users and groups...
Users and groups added OK
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 alread 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 './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'...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
The script that failed was: './E-importnagiosql'
Thanks
HG
Re: NagiosXI Install error
Posted: Tue Dec 20, 2011 1:45 pm
by scottwilkerson
Being this machine is behind a proxy, I want you to take a look at this:
http://support.nagios.com/wiki/index.ph ... th_Proxies
Additionally, you may be missing the following package, and you'll have to figure out how to get it installed through your proxy.
php-pear-HTML-Template-IT.noarch
You can check if it got installed by running:
Re: NagiosXI Install error
Posted: Tue Dec 20, 2011 11:34 pm
by tohariganesh
Hi Scott,
Thanks again for the response.
I had already set the Proxy settings in yum and wget configuration files and have set it for pear also.
[root@nagios-dev1 nagiosxi]# pear config-set http_proxy '
http://web-proxy.atl.hp.com:8088'
config-set succeeded
[root@nagios-dev1 nagiosxi]# yum list installed | grep pear
php-pear.noarch 1:1.4.9-6.el5 installed
php-pear-HTML-Template-IT.noarch 1.3.0-2.el5 installed
[root@nagios-dev1 nagiosxi]# ./E-importnagiosql
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
But still the issue is persisting.
What exactly is being imported from "/usr/local/nagios/etc/import" folder. How can i populate it with required configuration files? Currently the folder has no files.
Thanks
HG
Re: NagiosXI Install error
Posted: Wed Dec 21, 2011 1:28 pm
by scottwilkerson
I see you are running this from the prompt...
This is just one of many steps in the install.
Can I have you try
again.
Re: NagiosXI Install error
Posted: Mon Dec 26, 2011 2:07 am
by tohariganesh
Hi ,
./fullinstall also throws out the same error at exactly the same step.
All the other steps in fullinstall script show success.
Am not in a position to paste the output now.
Thanks
HG
Re: NagiosXI Install error
Posted: Tue Dec 27, 2011 11:46 am
by scottwilkerson
Can I have you run the following:
Code: Select all
cd /tmp/nagiosxi
cp -r ./subcomponents/nagioscore/mods/cfg/import/* /usr/local/nagios/etc/import
chown apache:nagios /usr/local/nagios/etc/import/*.cfg
./fullinstall
Re: NagiosXI Install error
Posted: Wed Jan 18, 2012 4:56 am
by tohariganesh
Hi Scott,
Thanks for the response and apologies for the late response. I got hooked up on a critical work.
After copying the contents,i am getting the below error:
Code: Select all
[root@nagios-dev1 nagiosxi]# ./E-importnagiosql
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
/tmp/nagiosxi/nagiosxi/basedir/scripts /tmp/nagiosxi
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
IMPORTING CONFIG FILES...Array
(
[0] => nagiosadmin.cfg
[1] => xicommands.cfg
[2] => xiobjects.cfg
[3] => xitemplates.cfg
[4] => xiwzardtemplates.cfg
)
IMPORTING /usr/local/nagios/etc/import/nagiosadmin.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/nagiosadmin.cfg' -O nagiosql.import.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:09-- http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:10-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:10 (502 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]
IMPORTING /usr/local/nagios/etc/import/xicommands.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xicommands.cfg' -O nagiosql.import.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:10-- http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:10-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:10 (456 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]
IMPORTING /usr/local/nagios/etc/import/xiobjects.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xiobjects.cfg' -O nagiosql.import.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:10-- http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:11-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:11 (418 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]
IMPORTING /usr/local/nagios/etc/import/xitemplates.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xitemplates.cfg' -O nagiosql.import.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:11-- http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:12-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:12 (456 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]
IMPORTING /usr/local/nagios/etc/import/xiwzardtemplates.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xiwzardtemplates.cfg' -O nagiosql.import.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:12-- http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:13-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:13 (456 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]
SETUID ROOT OK
RESETTING PERMS
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:13-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:14-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.export.monitoring'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:14 (456 MB/s) - `nagiosql.export.monitoring' saved [5259/5259]
Cannot open cookies file `nagiosql.cookies': No such file or directory
--2011-11-01 03:23:14-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2011-11-01 03:23:15-- http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.export.additional'
100%[===================================================================================================================>] 5,259 --.-K/s in 0s
2011-11-01 03:23:15 (418 MB/s) - `nagiosql.export.additional' saved [5259/5259]
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/Dev-Mysql.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/Dev-App.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/Dev-Web.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/Dev-Loadbalancer.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-Mysql1.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-Web1.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-Web2.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-Lbr.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-App1.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/QA-App2.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 79 services.
Checking hosts...
Checked 11 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 26 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
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: done.
Starting nagios: done.
SETUID ROOT OK
RESETTING PERMS
/usr/local/nagiosxi/nom/checkpoints/nagioscore /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi
/tmp/nagiosxi/nagiosxi/basedir/scripts
grep: nagiosxi/basedir/scripts/nagiosql.login: No such file or directory
ERROR: Unable to login to NagiosQL on 'localhost' - exiting. If you have a proxy configured, this may be the cause of the problem.
The Linux VM in which I am trying this installation is in my office Intranet and is behind a proxy. Hence i have unset the http_proxy as the above error points so. But even after unsetting i am getting the same error.
Thanks
HG
Re: NagiosXI Install error
Posted: Wed Jan 18, 2012 5:47 am
by tohariganesh
Adding to the above post,i am able to bring up the "postgresql" and "mysql" db's in the localhost.
[root@nagios-dev1 nagiosxi]# ./3-dbservers
Database servers already initialized - skipping.
[root@nagios-dev1 nagiosxi]# service mysqld status
mysqld (pid 17602) is running...
[root@nagios-dev1 nagiosxi]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@nagios-dev1 nagiosxi]# mysql -uroot -pnagiosxi
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
[root@nagios-dev1 nagiosxi]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
Not sure why it's saying DB connection failed while running "./E-importnagiosql"
Thanks
HG