Page 1 of 1

Problem during upgrade to 2012R2.0

Posted: Wed May 22, 2013 3:10 am
by DennisPR
Hi,

I'm trying to upgrade our Nagios XI 2012 R1.8 to 2012R2.0 but it stops with the folloing output :

Code: Select all

type 'make' to compile the NDO utilities.

cd ./src && make
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.2/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.5.2/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 queue.c 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.5.2/src'
make ndo2db-3x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.2/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 queue.c 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.5.2/src'
make ndomod-2x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.2/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.5.2/src'
make ndomod-3x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.2/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.5.2/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.5.2/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
NDOUTILS POST-UPGRADE...
net.core.rmem_default = 262144
kernel.shmmax = 4294967295
kernel.msgmax = 131072000
kernel.msgmnb = 131072000
net.core.wmem_default = 262144
net.ipv4.conf.default.rp_filter = 1
error: "Invalid argument" setting key "kernel.sem"
kernel.shmmni = 4096
net.core.wmem_max = 1048576
net.ipv4.tcp_syncookies = 1
error: "Invalid argument" setting key "net.ipv4.ip_local_port_range"
net.ipv4.ip_forward = 0
net.core.rmem_max = 4194304
kernel.sysrq = 0
net.ipv4.conf.default.accept_source_route = 0
kernel.shmall = 268435456
kernel.core_uses_pid = 1
Can someone please help me out ?

Re: Problem during upgrade to 2012R2.0

Posted: Wed May 22, 2013 7:37 am
by scottwilkerson
Do you have ab offloaded database?

Re: Problem during upgrade to 2012R2.0

Posted: Thu May 23, 2013 3:19 am
by DennisPR
Sorry Scott what do you mean by an offloaded database ?
The database and Nagios are running on the same machine.

Re: Problem during upgrade to 2012R2.0

Posted: Thu May 23, 2013 9:42 am
by sreinhardt
Just to verify, both the postgresql and mysql databases that nagios uses are on the same system as the nagios and ndo2db processes? Otherwise could you please post your /etc/sysctl.conf file in [ code] [/code ] tags. I think the error is actually to do with settings there.

Re: Problem during upgrade to 2012R2.0

Posted: Fri May 24, 2013 3:14 am
by DennisPR
Where can I see te configuration of the databases for Nagios XI pls ?
PostgreSQL & MySQL databases are running on the same machine as far as I know but I would like to double check.
dbhost is set to localhost in
  • /usr/local/nagios/etc/ndo2db.cfg
    /usr/local/nagiosxi/html/config.inc.php
    /var/www/html/nagiosql/config/settings.php
    CCM global settings
Here is the content of the /etc/sysctl.conf

Code: Select all

net.core.rmem_default=262144
kernel.shmmax = 4294967295
kernel.msgmax = 131072000
kernel.msgmnb = 131072000
net.core.wmem_default=262144
net.ipv4.conf.default.rp_filter=1
kernel.sem="250 32000 100 128"
kernel.shmmni=4096
net.core.wmem_max=1048576
net.ipv4.tcp_syncookies=1
net.ipv4.ip_local_port_range="9000 65500"
net.ipv4.ip_forward=0
net.core.rmem_max=4194304
kernel.sysrq=0
net.ipv4.conf.default.accept_source_route=0
kernel.shmall = 268435456
kernel.core_uses_pid=1

Re: Problem during upgrade to 2012R2.0

Posted: Fri May 24, 2013 1:34 pm
by lmiltchev
Can you run the following commands and show the output?

Code: Select all

cat /etc/*release
uname -a

Re: Problem during upgrade to 2012R2.0

Posted: Fri May 24, 2013 1:55 pm
by sreinhardt
It seems that because you have "" around things that should be separate values it is failing. Try changing the lines like below or use the full config at the bottom. I have verified this works on my system. Then just run the upgrade script again!

Code: Select all

Original:
net.ipv4.ip_local_port_range="9000 65500"
kernel.sem="250 32000 100 128"
Changed:
net.ipv4.ip_local_port_range=9000 65500
kernel.sem=250 32000 100 128

Code: Select all

net.core.rmem_default=262144
kernel.shmmax = 4294967295
kernel.msgmax = 131072000
kernel.msgmnb = 131072000
net.core.wmem_default=262144
net.ipv4.conf.default.rp_filter=1
kernel.sem=250 32000 100 128
kernel.shmmni=4096
net.core.wmem_max=1048576
net.ipv4.tcp_syncookies=1
net.ipv4.ip_local_port_range=9000 65500
net.ipv4.ip_forward=0
net.core.rmem_max=4194304
kernel.sysrq=0
net.ipv4.conf.default.accept_source_route=0
kernel.shmall = 268435456
kernel.core_uses_pid=1

Re: Problem during upgrade to 2012R2.0

Posted: Mon May 27, 2013 3:17 am
by DennisPR
@sreinhardt : Removing the " in the /etc/sysctl.conf fixed the issue ! Thx !
@lmiltchev : fyi
cat /etc/*release

Code: Select all

CentOS release 6.4 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
uname -a
Linux myhostname 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux