Error Installation nagios-XI 5.5.0

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jocalinux
Posts: 1
Joined: Fri Jul 06, 2018 9:58 pm

Error Installation nagios-XI 5.5.0

Post by jocalinux »

Hello guys,

Visiting this fórum, I founded any similar posts, with solutions, but when I tried apply, not successfully. For this, I create a new post.

My OS: CentOS 7.5 (64-bit)
Minimal Installation with Internet access.
SELinux: Enforcing
Firewalld: disabled
MariaDB-Server: version 10.3.8

Recently, I downloaded the last installation file (Nagios-XI 5.5.0). So, I tried run as root the install script:

Code: Select all

cd /tmp/nagiosxi/
./fullinstall
I found an error when the script installation try install ndoutils:

Code: Select all

cd ./src && make
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.2/src'
gcc -fPIC -fPIC -g -O2 -DHAVE_CONFIG_H  -c -o io.o io.c
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm -lnsl 
gcc -fPIC -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-2.1.2/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H  -c -o db.o db.c
db.c: In function ‘ndo2db_db_init’:
db.c:169:29: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
  if(!mysql_init(&idi->dbinfo.mysql_conn)){
                             ^
db.c: In function ‘ndo2db_db_connect’:
db.c:211:16: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
    &idi->dbinfo.mysql_conn,
                ^
db.c:218:4: error: ‘CLIENT_REMEMBER_OPTIONS’ undeclared (first use in this function)
    CLIENT_REMEMBER_OPTIONS
    ^
db.c:218:4: note: each undeclared identifier is reported only once for each function it appears in
db.c:220:27: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   mysql_close(&idi->dbinfo.mysql_conn);
                           ^
db.c:221:101: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   syslog(LOG_USER|LOG_INFO,"Error: Could not connect to MySQL database: %s",mysql_error(&idi->dbinfo.mysql_conn));
                                                                                                     ^
db.c: In function ‘ndo2db_db_disconnect’:
db.c:244:26: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
  mysql_close(&idi->dbinfo.mysql_conn);
                          ^
db.c: In function ‘ndo2db_db_hello’:
db.c:268:14: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
              ^
db.c:268:59: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
                                                           ^
db.c:269:18: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_row’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                  ^
db.c:269:56: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                                                        ^
db.c:270:53: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_row’
    ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],&idi->dbinfo.instance_id);
                                                     ^
db.c:273:32: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   mysql_free_result(idi->dbinfo.mysql_result);
                                ^
db.c:274:14: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=NULL;
              ^
db.c:283:56: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
    idi->dbinfo.instance_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
                                                        ^
db.c:303:55: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   idi->dbinfo.conninfo_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
                                                       ^
db.c: In function ‘ndo2db_db_query’:
db.c:477:30: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
  if (mysql_query(&idi->dbinfo.mysql_conn,buf)) {
                              ^
db.c:479:75: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   syslog(LOG_USER|LOG_INFO,"mysql_error: '%s'\n", mysql_error(&idi->dbinfo.mysql_conn));
                                                                           ^
db.c: In function ‘ndo2db_handle_db_error’:
db.c:512:33: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
  result=mysql_errno(&idi->dbinfo.mysql_conn);
                                 ^
db.c:513:13: error: ‘CR_SERVER_LOST’ undeclared (first use in this function)
  if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
             ^
db.c:513:39: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function)
  if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
                                       ^
db.c: In function ‘ndo2db_db_get_latest_data_time’:
db.c:565:14: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
              ^
db.c:565:59: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
                                                           ^
db.c:566:18: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_row’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                  ^
db.c:566:56: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                                                        ^
db.c:567:53: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_row’
    ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],t);
                                                     ^
db.c:569:32: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   mysql_free_result(idi->dbinfo.mysql_result);
                                ^
db.c:570:14: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=NULL;
              ^
make[2]: *** [db.o] Error 1
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.2/src'
make[1]: *** [ndo2db] Error 2
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.2/src'
make: *** [all] Error 2
So, I go Google and read this:

I have followed all these steps closely
https://support.nagios.com/kb/article.php?id=406

Code: Select all

[root@srv-nagios ndoutils-2.1.2]# echo 'show databases;' | mysql -u ndoutils -p'MyPass' -h localhost
Database
information_schema
nagios
I read too:

https://support.nagios.com/forum/viewto ... =7&t=41740 (with the same error, but locked post :| )
https://support.nagios.com/forum/viewto ... =7&t=25133
https://support.nagios.com/forum/viewto ... =7&t=44447

but I could not solve the installation problem. To reproduce this problem, I can:

Code: Select all

[root@srv-nagios ~]# cd /tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.2/
[root@srv-nagios ndoutils-2.1.2]# ./configure
[root@srv-nagios ndoutils-2.1.2]# make all
make all is the only usable option.

Code: Select all

[root@srv-nagios ndoutils-2.1.2]# rpm -qa | grep -i mariadb
MariaDB-client-10.3.8-1.el7.centos.x86_64
MariaDB-devel-10.3.8-1.el7.centos.x86_64
MariaDB-compat-10.3.8-1.el7.centos.x86_64
MariaDB-server-10.3.8-1.el7.centos.x86_64
MariaDB-common-10.3.8-1.el7.centos.x86_64
PS: I tried to search for other posts here, but I did not find anything that could help me. :\

Any idea?

Thanks. :)
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error Installation nagios-XI 5.5.0

Post by tgriep »

One thing to change on the server is SELinux.
It cannot be set to enforcing for Nagios to run so it should be disabled.

It could be that the version of MariaDB-devel that you are using removed some functionality that is needed, do you know where you found that version?
Can you remove it and use the stock version of MariaDB instead?

If you stick with that version of MariaDB, you will have to do the following steps from this KB article.
https://support.nagios.com/kb/article/n ... s-780.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked