Page 1 of 1

Config error after upgrade XI to 5.2.9

Posted: Mon Aug 08, 2016 6:00 pm
Cannot apply config after upgrade to 5.2.9
Error: Could not find any host matching '<servername>'(config file '/usr/local/nagios/etc/services/<servername>.cfg', starting on line 159)
Error: Failed to expand host list '<servername>' for service 'Uptime' (/usr/local/nagios/etc/services/<servername>..cfg:159)

What is the best way to resolve this?

Re: Config error after upgrade XI to 5.2.9

Posted: Mon Aug 08, 2016 7:02 pm
The Nagios XI is running in a VMware 5.5.0 environment imported from an ova.
CentOS release 6.5 (Final)
Kernel 2.6.32-358.2.1.e16.x86_64 on an x86_64, (64 bit)

Re: Config error after upgrade XI to 5.2.9

Posted: Mon Aug 08, 2016 7:03 pm
The server is online and is PINGable. But services are not working and they cannot be deleted. This server is running a NS client that was working before the upgrade

Re: Config error after upgrade XI to 5.2.9

Posted: Mon Aug 08, 2016 7:27 pm
by Box293
Can you run the following in an ssh session on your Nagios XI host.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Then go into XI and Apply Configuration.

What output is produced in the SSH session?

Re: Config error after upgrade XI to 5.2.9

Posted: Tue Aug 09, 2016 10:50 am
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
............................................................tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated

PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
............................................................
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
............................................................tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
..
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2016-08-09 08:50:22-- http://localhost/nagiosxi/includes/components/ccm/
Connecting to 172.16.2.203:80... connected.
Proxy request sent, awaiting response... 504 Gateway Timeout
2016-08-09 08:50:22 ERROR 504: Gateway Timeout.

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
......................................
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
........................................

Re: Config error after upgrade XI to 5.2.9

Posted: Tue Aug 09, 2016 2:08 pm
I made sure that the host is PINGable and Tested the client install.
The NSClinet++ (x64) Stable version is installed and working properly on the host
Line 159 in the host config file matches the entries for other similar hosts

Re: Config error after upgrade XI to 5.2.9

Posted: Tue Aug 09, 2016 3:57 pm
by tgriep
It looks like your system is setup to use a proxy server and that is causing the issue.
Here is a link for you to look at for the changes to the XI server to function behind a proxy.
https://support.nagios.com/kb/article.php?id=147
Adding the no_proxy setting to the /etc/wgetrc file should work for you.

Re: Config error after upgrade XI to 5.2.9

Posted: Tue Aug 09, 2016 7:21 pm
Thanks, that resolved the issue. Please close this.