Page 1 of 1

CentOS 5.7 installation problem

Posted: Wed Nov 02, 2011 11:18 am
by fbijma
Hello,

I am trying to install version 1.8 on a fresh and clean server. Iam getting the following errors:

Code: Select all

cd ./src && make
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -c -o io.o io.c
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -c -o utils.o utils.c
gcc -g -O2 -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm -lnsl 
gcc -g -O2 -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm -lnsl 
make ndo2db-2x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -DHAVE_CONFIG_H  -c -o db.o db.c
gcc -g -O2 -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
gcc -g -O2 -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o io.o utils.o db.o    -lnsl  -lm 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndo2db-3x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
gcc -g -O2 -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x ndo2db.c dbhandlers-3x.o io.o utils.o db.o    -lnsl  -lm 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndomod-2x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c io.o utils.o -shared   -lnsl 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndomod-3x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c io.o utils.o -shared   -lnsl 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm -lnsl 
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
/usr/bin/install -c -m 755 -o root -g root -d /etc/rc.d/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/init.d/ndo2db
/tmp/nagiosxi/subcomponents/ndoutils
NDOUTILS-POST
NOTE: If prompted, enter the MySQL root password
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
NOTE: If prompted, enter the MySQL root password
ERROR: NDOUtils database install appears to have failed - exiting.
ERROR: Subcomponent 'ndoutils' installation failed - exiting.
Subcomponents installation failed - exiting
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
The script that failed was: './A-subcomponents'
When I normaly logon with root it works perfectly in mysql.
I tried filling the IP number of the host and then it works from there but again other problems.
It keeps saying that it did not create the database while it does exist.

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Wed Nov 02, 2011 12:36 pm
by nscott
Did have MySQL installed previously? Did you specify and non-default password for MySQL (not nagiosxi as password)?

Re: CentOS 5.7 installation problem

Posted: Wed Nov 02, 2011 3:12 pm
by fbijma
Yep, newly installed Mysql with a newly defined password for root.

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Thu Nov 03, 2011 2:21 pm
by mguthrie
I'd suggest:

uninstalling mysql,
rm -rf /tmp/nagiosxi directory
cd /tmp
tar zxf <the xi tarball.
cd nagiosxi
./fullinstall

Re: CentOS 5.7 installation problem

Posted: Fri Nov 04, 2011 12:06 pm
by fbijma
I did a complete new install of CentOs 6.0 and restarted
the installation. At exactly the same position I get

Code: Select all

checking for values.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for getopt_long... yes
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -shared
checking for mysql_config... /usr/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
MySQL library and include file(s) were found!
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating docs/docbook/en-en/Makefile
config.status: creating subst
config.status: creating include/config.h


*** Configuration summary for ndoutils 1.4b9 10-27-2009 ***:

 General Options:
 -------------------------
 NDO2DB user:    nagios
 NDO2DB group:   nagios


Review the options above for accuracy.  If they look okay,
type 'make' to compile the NDO utilities.

cd ./src && make
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -c -o io.o io.c
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -c -o utils.o utils.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm -lnsl 
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm -lnsl 
make ndo2db-2x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -c -o db.o db.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o io.o utils.o db.o    -lnsl -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto -lm 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndo2db-3x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x ndo2db.c dbhandlers-3x.o io.o utils.o db.o    -lnsl -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto -lm 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndomod-2x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c io.o utils.o -shared   -lnsl 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
make ndomod-3x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c io.o utils.o -shared   -lnsl 
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm -lnsl 
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.4b9/src'
/usr/bin/install -c -m 755 -o root -g root -d /etc/rc.d/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/init.d/ndo2db
/tmp/nagiosxi/subcomponents/ndoutils
NDOUTILS-POST
NOTE: If prompted, enter the MySQL root password
Enter password: 
Enter password: 
Enter password: 
NOTE: If prompted, enter the MySQL root password
ERROR: NDOUtils database install appears to have failed - exiting.
ERROR: Subcomponent 'ndoutils' installation failed - exiting.
Subcomponents installation failed - exiting
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
The script that failed was: './A-subcomponents'


This time i removed the password variable from the post-install so it would ask me for
the password. No suc6

[root@lin-mon nagiosxi]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.1.47 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

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

mysql> 

So it did install the database
mysql> show tables
    -> ;
+----------------------------------------+
| Tables_in_nagios                       |
+----------------------------------------+
| nagios_acknowledgements                |
| nagios_commands                        |
| nagios_commenthistory                  |
| nagios_comments                        |
| nagios_configfiles                     |
| nagios_configfilevariables             |
| nagios_conninfo                        |
| nagios_contact_addresses               |
| nagios_contact_notificationcommands    |
| nagios_contactgroup_members            |
| nagios_contactgroups                   |
| nagios_contactnotificationmethods      |
| nagios_contactnotifications            |
| nagios_contacts                        |
| nagios_contactstatus                   |
| nagios_customvariables                 |
| nagios_customvariablestatus            |
| nagios_dbversion                       |
| nagios_downtimehistory                 |
| nagios_eventhandlers                   |
| nagios_externalcommands                |
| nagios_flappinghistory                 |
| nagios_host_contactgroups              |
| nagios_host_contacts                   |
| nagios_host_parenthosts                |
| nagios_hostchecks                      |
| nagios_hostdependencies                |
| nagios_hostescalation_contactgroups    |
| nagios_hostescalation_contacts         |
| nagios_hostescalations                 |
| nagios_hostgroup_members               |
| nagios_hostgroups                      |
| nagios_hosts                           |
| nagios_hoststatus                      |
| nagios_instances                       |
| nagios_logentries                      |
| nagios_notifications                   |
| nagios_objects                         |
| nagios_processevents                   |
| nagios_programstatus                   |
| nagios_runtimevariables                |
| nagios_scheduleddowntime               |
| nagios_service_contactgroups           |
| nagios_service_contacts                |
| nagios_servicechecks                   |
| nagios_servicedependencies             |
| nagios_serviceescalation_contactgroups |
| nagios_serviceescalation_contacts      |
| nagios_serviceescalations              |
| nagios_servicegroup_members            |
| nagios_servicegroups                   |
| nagios_services                        |
| nagios_servicestatus                   |
| nagios_statehistory                    |
| nagios_systemcommands                  |
| nagios_timedeventqueue                 |
| nagios_timedevents                     |
| nagios_timeperiod_timeranges           |
| nagios_timeperiods                     |
+----------------------------------------+
59 rows in set (0.00 sec)

mysql> 
Table are also there.

So Please tell me what is going wrong here!

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Fri Nov 04, 2011 12:13 pm
by fbijma
Restarting the install of NDOUTILS now gives:

/tmp/nagiosxi/subcomponents/ndoutils
NDOUTILS-POST
NOTE: If prompted, enter the MySQL root password
Enter password:
NDOUtils database already exists - skipping creation...
NOTE: If prompted, enter the MySQL root password
ERROR: NDOUtils database install appears to have failed - exiting.
You have new mail in /var/spool/mail/root

Why o Why is the database install failing while it is there??

Am I missing something missing any RPM's Can't find any pre-req documentation about what should be installed.

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Fri Nov 04, 2011 12:39 pm
by fbijma
I think I found a bug.

All the subcomponents have a problem with the mysql password. If I remove the password variable
and enter passwords manualy it works ok. It is still installing now. Hope it will finalyse now.

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Sat Nov 05, 2011 2:27 pm
by fbijma
OK, started all over again and removed the mysql password. After that I dropped all databases
and restarted full install.

It ran a very long way but after a while came back with the following error:

Code: Select all

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)...
Database structure already created - skipping...
Database schema created successfully.
Database already contains values - skipping data load...
Data inserted into database successfully.
Nagios XI PostgresQL Database Initialized OK.
Nagios XI base files installed OK
RESULT=0
Running './C-cronjobs'...
Crontabs installed OK
RESULT=0
Running './D-chkconfigalldaemons'...
Daemons configured to start OK
RESULT=0
Running './E-importnagiosql'...
httpd: no process killed
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.5.127 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...
        DB Connect Error [nagiosxi]: Database connection failed 
ERROR CONNECTING TO DATABASES!
NAGIOSQL LOGIN FAILED!
ERROR: NagiosQL import appears to have failed - exiting.  (Reason: Import files are still present in /usr/local/nagios/etc/import)
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'
You have new mail in /var/spool/mail/root

It now did not import data. Maybe somebody knows what is going wrong in this step?

Regards Frans

Re: CentOS 5.7 installation problem

Posted: Sun Nov 06, 2011 3:11 pm
by fbijma
Well finaly it all works.
I forgot something major important that worked out very well after I did it.

I forgot to install the updates that should have been installed after installing CentOS.

After doing the updates dropped the databases removed the nagios install directories
and reinstalled it all again.

Hope this helps someone that had the same problems.

Regards Frans