Upgrade is Failing
Posted: Wed Aug 07, 2019 6:49 am
Hi,
I am trying to upgrade to the latest version of Nagios XI. However, the upgrade is failing. I am receiving the following error
*** Configuration summary for ndoutils 2.1.3 2017-04-13 ***:
General Options:
-------------------------
NDO2DB user: nagios
NDO2DB group: nagios
NDO2DB tcp port: 5668
Review the options above for accuracy. If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.
cd ./src && make
make[1]: Entering directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -fPIC -g -O2 -DHAVE_CONFIG_H -c -o io.o io.c
gcc -fPIC -fPIC -g -O2 -DHAVE_CONFIG_H -c -o utils.o utils.c
utils.c: In function ‘my_rename’:
utils.c:142:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(dest_fd,buffer,bytes_read);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H -c -o db.o db.c
db.c: In function ‘ndo2db_db_init’:
db.c:169:6: warning: implicit declaration of function ‘mysql_init’; did you mean ‘si_int’? [-Wimplicit-function-declaration]
if(!mysql_init(&idi->dbinfo.mysql_conn)){
^~~~~~~~~~
si_int
db.c:169:29: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
if(!mysql_init(&idi->dbinfo.mysql_conn)){
^
db.c: In function ‘ndo2db_db_connect’:
db.c:210:7: warning: implicit declaration of function ‘mysql_real_connect’ [-Wimplicit-function-declaration]
if (!mysql_real_connect(
^~~~~~~~~~~~~~~~~~
db.c:211:16: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:3: warning: implicit declaration of function ‘mysql_close’ [-Wimplicit-function-declaration]
mysql_close(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~
db.c:220:27: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
mysql_close(&idi->dbinfo.mysql_conn);
^
db.c:221:77: warning: implicit declaration of function ‘mysql_error’; did you mean ‘hstrerror’? [-Wimplicit-function-declaration]
syslog(LOG_USER|LOG_INFO,"Error: Could not connect to MySQL database: %s",mysql_error(&idi->dbinfo.mysql_conn));
^~~~~~~~~~~
hstrerror
db.c:221:101: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
mysql_close(&idi->dbinfo.mysql_conn);
^
db.c: In function ‘ndo2db_db_hello’:
db.c:265:5: warning: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
if(asprintf(&buf,"SELECT instance_id FROM %s WHERE instance_name='%s'",ndo2db_db_tablenames[NDO2DB_DBTABLE_INSTANCES],idi->instance_name)==-1)
^~~~~~~~
vsprintf
db.c:268:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:268:28: warning: implicit declaration of function ‘mysql_store_result’ [-Wimplicit-function-declaration]
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~~~~~~~~
db.c:268:59: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:269:18: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
^
db.c:269:29: warning: implicit declaration of function ‘mysql_fetch_row’ [-Wimplicit-function-declaration]
if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
^~~~~~~~~~~~~~~
db.c:269:56: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],&idi->dbinfo.instance_id);
^
db.c:273:3: warning: implicit declaration of function ‘mysql_free_result’ [-Wimplicit-function-declaration]
mysql_free_result(idi->dbinfo.mysql_result);
^~~~~~~~~~~~~~~~~
db.c:273:32: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
mysql_free_result(idi->dbinfo.mysql_result);
^
db.c:274:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=NULL;
^
db.c:283:28: warning: implicit declaration of function ‘mysql_insert_id’ [-Wimplicit-function-declaration]
idi->dbinfo.instance_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~~~~~
db.c:283:56: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.instance_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
^
db.c:303:55: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:6: warning: implicit declaration of function ‘mysql_query’ [-Wimplicit-function-declaration]
if (mysql_query(&idi->dbinfo.mysql_conn,buf)) {
^~~~~~~~~~~
db.c:477:30: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
if (mysql_query(&idi->dbinfo.mysql_conn,buf)) {
^
db.c:479:75: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:9: warning: implicit declaration of function ‘mysql_errno’; did you mean ‘h_errno’? [-Wimplicit-function-declaration]
result=mysql_errno(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~
h_errno
db.c:512:33: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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); did you mean ‘RQ_SERVER_NAME’?
if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
^~~~~~~~~~~~~~
RQ_SERVER_NAME
db.c:513:39: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function); did you mean ‘CR_SERVER_LOST’?
if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
^~~~~~~~~~~~~~~~~~~~
CR_SERVER_LOST
db.c: In function ‘ndo2db_db_get_latest_data_time’:
db.c:565:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:565:59: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:566:18: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],t);
^
db.c:569:32: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
mysql_free_result(idi->dbinfo.mysql_result);
^
db.c:570:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=NULL;
^
Makefile:108: recipe for target 'db.o' failed
make[2]: *** [db.o] Error 1
make[2]: Leaving directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
Makefile:71: recipe for target 'ndo2db' failed
make[1]: *** [ndo2db] Error 2
make[1]: Leaving directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
Makefile:74: recipe for target 'all' failed
make: *** [all] Error 2
I am trying to upgrade to the latest version of Nagios XI. However, the upgrade is failing. I am receiving the following error
*** Configuration summary for ndoutils 2.1.3 2017-04-13 ***:
General Options:
-------------------------
NDO2DB user: nagios
NDO2DB group: nagios
NDO2DB tcp port: 5668
Review the options above for accuracy. If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.
cd ./src && make
make[1]: Entering directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -fPIC -g -O2 -DHAVE_CONFIG_H -c -o io.o io.c
gcc -fPIC -fPIC -g -O2 -DHAVE_CONFIG_H -c -o utils.o utils.c
utils.c: In function ‘my_rename’:
utils.c:142:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(dest_fd,buffer,bytes_read);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H -c -o db.o db.c
db.c: In function ‘ndo2db_db_init’:
db.c:169:6: warning: implicit declaration of function ‘mysql_init’; did you mean ‘si_int’? [-Wimplicit-function-declaration]
if(!mysql_init(&idi->dbinfo.mysql_conn)){
^~~~~~~~~~
si_int
db.c:169:29: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
if(!mysql_init(&idi->dbinfo.mysql_conn)){
^
db.c: In function ‘ndo2db_db_connect’:
db.c:210:7: warning: implicit declaration of function ‘mysql_real_connect’ [-Wimplicit-function-declaration]
if (!mysql_real_connect(
^~~~~~~~~~~~~~~~~~
db.c:211:16: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:3: warning: implicit declaration of function ‘mysql_close’ [-Wimplicit-function-declaration]
mysql_close(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~
db.c:220:27: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
mysql_close(&idi->dbinfo.mysql_conn);
^
db.c:221:77: warning: implicit declaration of function ‘mysql_error’; did you mean ‘hstrerror’? [-Wimplicit-function-declaration]
syslog(LOG_USER|LOG_INFO,"Error: Could not connect to MySQL database: %s",mysql_error(&idi->dbinfo.mysql_conn));
^~~~~~~~~~~
hstrerror
db.c:221:101: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
mysql_close(&idi->dbinfo.mysql_conn);
^
db.c: In function ‘ndo2db_db_hello’:
db.c:265:5: warning: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
if(asprintf(&buf,"SELECT instance_id FROM %s WHERE instance_name='%s'",ndo2db_db_tablenames[NDO2DB_DBTABLE_INSTANCES],idi->instance_name)==-1)
^~~~~~~~
vsprintf
db.c:268:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:268:28: warning: implicit declaration of function ‘mysql_store_result’ [-Wimplicit-function-declaration]
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~~~~~~~~
db.c:268:59: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:269:18: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
^
db.c:269:29: warning: implicit declaration of function ‘mysql_fetch_row’ [-Wimplicit-function-declaration]
if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
^~~~~~~~~~~~~~~
db.c:269:56: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],&idi->dbinfo.instance_id);
^
db.c:273:3: warning: implicit declaration of function ‘mysql_free_result’ [-Wimplicit-function-declaration]
mysql_free_result(idi->dbinfo.mysql_result);
^~~~~~~~~~~~~~~~~
db.c:273:32: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
mysql_free_result(idi->dbinfo.mysql_result);
^
db.c:274:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=NULL;
^
db.c:283:28: warning: implicit declaration of function ‘mysql_insert_id’ [-Wimplicit-function-declaration]
idi->dbinfo.instance_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~~~~~
db.c:283:56: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.instance_id=mysql_insert_id(&idi->dbinfo.mysql_conn);
^
db.c:303:55: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:6: warning: implicit declaration of function ‘mysql_query’ [-Wimplicit-function-declaration]
if (mysql_query(&idi->dbinfo.mysql_conn,buf)) {
^~~~~~~~~~~
db.c:477:30: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
if (mysql_query(&idi->dbinfo.mysql_conn,buf)) {
^
db.c:479:75: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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:9: warning: implicit declaration of function ‘mysql_errno’; did you mean ‘h_errno’? [-Wimplicit-function-declaration]
result=mysql_errno(&idi->dbinfo.mysql_conn);
^~~~~~~~~~~
h_errno
db.c:512:33: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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); did you mean ‘RQ_SERVER_NAME’?
if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
^~~~~~~~~~~~~~
RQ_SERVER_NAME
db.c:513:39: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function); did you mean ‘CR_SERVER_LOST’?
if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
^~~~~~~~~~~~~~~~~~~~
CR_SERVER_LOST
db.c: In function ‘ndo2db_db_get_latest_data_time’:
db.c:565:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:565:59: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
^
db.c:566:18: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ 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 {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],t);
^
db.c:569:32: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
mysql_free_result(idi->dbinfo.mysql_result);
^
db.c:570:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
idi->dbinfo.mysql_result=NULL;
^
Makefile:108: recipe for target 'db.o' failed
make[2]: *** [db.o] Error 1
make[2]: Leaving directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
Makefile:71: recipe for target 'ndo2db' failed
make[1]: *** [ndo2db] Error 2
make[1]: Leaving directory '/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
Makefile:74: recipe for target 'all' failed
make: *** [all] Error 2