Upgrade is Failing
Upgrade is Failing
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
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Upgrade is Failing
Are you running the full upgrade instructions found here?
https://assets.nagios.com/downloads/nag ... ctions.pdf
https://assets.nagios.com/downloads/nag ... ctions.pdf
Re: Upgrade is Failing
Hi,
I get the following error
......
Removing the old /tmp/nagiosxi directory, and xi-* tarball
/usr/bin/wget
Downloading latest Nagios XI release
--2019-08-07 17:08:43-- https://assets.nagios.com/downloads/nag ... est.tar.gz
Resolving assets.nagios.com (assets.nagios.com)... 72.14.181.71, 2600
:f03c:91ff:fedf:b821
Connecting to assets.nagios.com (assets.nagios.com)|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58048805 (55M) [application/x-gzip]
Saving to: ‘/tmp/xi-latest.tar.gz’
/tmp/xi-latest.tar.gz 100%[========================================================================================================================================>] 55.36M 12.2MB/s in 5.3s
2019-08-07 17:08:49 (10.5 MB/s) - ‘/tmp/xi-latest.tar.gz’ saved [58048805/58048805]
Running upgrade
Nagios XI Upgrade Log
==========================
DATE: Wed Aug 7 17:08:51 GMT 2019
DISTRO INFO:
Ubuntu
18.04
x86_64
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib/php/20170718/ixed.7.2.lin
Sourceguardian extension found for PHP version 7.2
Sourceguardian extension already in php.ini
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@<IP Address>:/tmp# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Wed 2019-08-07 17:08:51 GMT; 51s ago
Process: 31964 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 30052 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/FAILURE)
Process: 31970 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 30005 (code=exited, status=0/SUCCESS)
Aug 07 17:08:51 <IP Address> systemd[1]: Starting The Apache HTTP Server...
Aug 07 17:08:51 <IP Address> apachectl[31970]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 172 of /etc/apache2/sites-enabled/default-ssl.conf: </VirtualHost> without matching <VirtualHost> sect
Aug 07 17:08:51 <IP Address> apachectl[31970]: Action 'start' failed.
Aug 07 17:08:51 <IP Address> apachectl[31970]: The Apache error log may have more information.
Aug 07 17:08:51 <IP Address> systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 07 17:08:51 <IP Address> systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 07 17:08:51 <IP Address> systemd[1]: Failed to start The Apache HTTP Server.
I get the following error
......
Removing the old /tmp/nagiosxi directory, and xi-* tarball
/usr/bin/wget
Downloading latest Nagios XI release
--2019-08-07 17:08:43-- https://assets.nagios.com/downloads/nag ... est.tar.gz
Resolving assets.nagios.com (assets.nagios.com)... 72.14.181.71, 2600
Connecting to assets.nagios.com (assets.nagios.com)|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58048805 (55M) [application/x-gzip]
Saving to: ‘/tmp/xi-latest.tar.gz’
/tmp/xi-latest.tar.gz 100%[========================================================================================================================================>] 55.36M 12.2MB/s in 5.3s
2019-08-07 17:08:49 (10.5 MB/s) - ‘/tmp/xi-latest.tar.gz’ saved [58048805/58048805]
Running upgrade
Nagios XI Upgrade Log
==========================
DATE: Wed Aug 7 17:08:51 GMT 2019
DISTRO INFO:
Ubuntu
18.04
x86_64
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib/php/20170718/ixed.7.2.lin
Sourceguardian extension found for PHP version 7.2
Sourceguardian extension already in php.ini
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@<IP Address>:/tmp# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Wed 2019-08-07 17:08:51 GMT; 51s ago
Process: 31964 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 30052 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/FAILURE)
Process: 31970 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 30005 (code=exited, status=0/SUCCESS)
Aug 07 17:08:51 <IP Address> systemd[1]: Starting The Apache HTTP Server...
Aug 07 17:08:51 <IP Address> apachectl[31970]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 172 of /etc/apache2/sites-enabled/default-ssl.conf: </VirtualHost> without matching <VirtualHost> sect
Aug 07 17:08:51 <IP Address> apachectl[31970]: Action 'start' failed.
Aug 07 17:08:51 <IP Address> apachectl[31970]: The Apache error log may have more information.
Aug 07 17:08:51 <IP Address> systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 07 17:08:51 <IP Address> systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 07 17:08:51 <IP Address> systemd[1]: Failed to start The Apache HTTP Server.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Upgrade is Failing
Ok, it looks like someone modified an apache configuration file that is causing the issueCode: Select all
Aug 07 17:08:51 <IP Address> apachectl[31970]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 172 of /etc/apache2/sites-enabled/default-ssl.conf: </VirtualHost> without matching <VirtualHost> sect
Can you zip up everything in (and under) /etc/apache2 and send it to us and we can take a look to see where the error was made
Re: Upgrade is Failing
Thanks Scott. The updated /etc/apache2/sites-available/default-ssl.conf file you provided resolved the issue
When I run upgrade.sh, I now get the following new error
make[2]: Leaving directory '/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -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-2.1.3/src'
/usr/bin/install -c -m 644 startup/default-service /lib/systemd/system/ndo2db.service
UPGRADE: POST-UPGRADE: NDOUtils post upgrade started...
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
Removing depricated failure_prediction_enabled from NagiosQL
mysql: [Warning] Using a password on the command line interface can be insecure.
copying updated mysql-upgrade-2.0.0.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'ndoutils'@'localhost' (using password: YES)
Please note, as part of this NagiosXI installation, the database has been offloaded to an external MySQL server
Regards,
Nelson
When I run upgrade.sh, I now get the following new error
make[2]: Leaving directory '/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-2.1.3/src'
gcc -fPIC -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-2.1.3/src'
/usr/bin/install -c -m 644 startup/default-service /lib/systemd/system/ndo2db.service
UPGRADE: POST-UPGRADE: NDOUtils post upgrade started...
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
Removing depricated failure_prediction_enabled from NagiosQL
mysql: [Warning] Using a password on the command line interface can be insecure.
copying updated mysql-upgrade-2.0.0.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'ndoutils'@'localhost' (using password: YES)
Please note, as part of this NagiosXI installation, the database has been offloaded to an external MySQL server
Regards,
Nelson
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Upgrade is Failing
Does the ndoutils user you have setup in the offloaded DB have the permissions to alter tables and create indexes?
Re: Upgrade is Failing
Hi Scott,
To confirm, does the ndoutils user in the offloaded database need to be 'ndoutils'@'<IP Address of My NagiosXI Server>.
The error message in the latest upgrade.sh reports an issue with 'ndoutils'@'localhost'
Regards,
Nelson
To confirm, does the ndoutils user in the offloaded database need to be 'ndoutils'@'<IP Address of My NagiosXI Server>.
The error message in the latest upgrade.sh reports an issue with 'ndoutils'@'localhost'
Regards,
Nelson
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Upgrade is Failing
It uses the user/password defined in this file
Code: Select all
/usr/local/nagiosxi/html/config.inc.phpRe: Upgrade is Failing
Hi Scott,
I checked this config file, I see the following settings
Under the ndoutils section, I have a user called nagios. Is this correct?
cat /usr/local/nagiosxi/html/config.inc.php
.........
........
// DB-specific connection information
$cfg['db_info'] = array(
"nagiosxi" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagiosxi',
"pwd" => '<PWD>',
"db" => 'nagiosxi',
"dbmaint" => array( // variables affecting maintenance of db
"max_auditlog_age" => 30, // max time (in DAYS) to keep audit log entries
"max_commands_age" => 480, // max time (minutes) to keep commands
"max_events_age" => 480, // max time (minutes) to keep events
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
"ndoutils" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagios',
"pwd" => '<PWD>',
"db" => 'nagios',
"dbmaint" => array( // variables affecting maintenance of ndoutils db
"max_externalcommands_age" => 7, // max time (in DAYS) to keep external commands
"max_logentries_age" => 90, // max time (in DAYS) to keep log entries
"max_statehistory_age" => 730, // max time (in DAYS) to keep state history information
"max_notifications_age" => 90, // max time (in DAYS) to keep notifications
"max_timedevents_age" => 5, // max time (minutes) to keep timed events
"max_systemcommands_age" => 5, // max time (minutes) to keep system commands
"max_servicechecks_age" => 5, // max time (minutes) to keep service checks
"max_hostchecks_age" => 5, // max time (minutes) to keep host checks
"max_eventhandlers_age" => 5, // max time (minutes) to keep event handlers
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
"nagiosql" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagiosql',
"pwd" => '<PWD>',
"db" => 'nagiosql',
"dbmaint" => array( // variables affecting maintenance of db
"max_logbook_age" => 480, // max time (minutes) to keep log book records
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
);
I checked this config file, I see the following settings
Under the ndoutils section, I have a user called nagios. Is this correct?
cat /usr/local/nagiosxi/html/config.inc.php
.........
........
// DB-specific connection information
$cfg['db_info'] = array(
"nagiosxi" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagiosxi',
"pwd" => '<PWD>',
"db" => 'nagiosxi',
"dbmaint" => array( // variables affecting maintenance of db
"max_auditlog_age" => 30, // max time (in DAYS) to keep audit log entries
"max_commands_age" => 480, // max time (minutes) to keep commands
"max_events_age" => 480, // max time (minutes) to keep events
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
"ndoutils" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagios',
"pwd" => '<PWD>',
"db" => 'nagios',
"dbmaint" => array( // variables affecting maintenance of ndoutils db
"max_externalcommands_age" => 7, // max time (in DAYS) to keep external commands
"max_logentries_age" => 90, // max time (in DAYS) to keep log entries
"max_statehistory_age" => 730, // max time (in DAYS) to keep state history information
"max_notifications_age" => 90, // max time (in DAYS) to keep notifications
"max_timedevents_age" => 5, // max time (minutes) to keep timed events
"max_systemcommands_age" => 5, // max time (minutes) to keep system commands
"max_servicechecks_age" => 5, // max time (minutes) to keep service checks
"max_hostchecks_age" => 5, // max time (minutes) to keep host checks
"max_eventhandlers_age" => 5, // max time (minutes) to keep event handlers
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
"nagiosql" => array(
"dbtype" => 'mysql',
"dbserver" => '<My Offloaded DB Server>',
"user" => 'nagiosql',
"pwd" => '<PWD>',
"db" => 'nagiosql',
"dbmaint" => array( // variables affecting maintenance of db
"max_logbook_age" => 480, // max time (minutes) to keep log book records
"optimize_interval" => 60, // time (in minutes) between db optimization runs
"repair_interval" => 0, // time (in minutes) between db repair runs
),
),
);
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Upgrade is Failing
My apologies I re-looked at the upgrade script and it grabs the user/pass from /usr/local/nagios/etc/ndo2db.cfg
Sorry about that, however these should match along with the db_host
Sorry about that, however these should match along with the db_host