Page 1 of 1

Fails To Start System Components After Install

Posted: Wed Feb 15, 2017 12:03 pm
by iMpulse
Following an installation of Nagios XI, I have errors on the following system components in the web UI:

Monitoring Engine: No lock file found in /usr/local/nagios/var/nagios.lock
Performance Grapher: NPCD not running

Attempting to run Action -> Start on either results in "An error occurred processing your request." (Capture.JPG attached)

Database Backend originally had a similar error. Starting the ndo2db service created the associated lock file, but I receive an error when starting the Nagios service. There's a support forum article related to the error but I believe it's on the "paying customers only" side:

Code: Select all

[root@xxx var]# ll | grep lock
-rw-r-----. 1 nagios nagios    6 Jan 19 19:43 ndo2db.lock

[root@xxx ~]# service npcd start
NPCD already started

[root@xxx ~]# service ndo2db start
ndo2db already started...

Code: Select all

[root@xxx ~]# service nagios start
Starting nagios:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
   Error processing object config files!

***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

Code: Select all

[root@xxx ~]# ls -la /usr/local/nagios/etc/
total 76
drwxrwsr-x. 7 apache nagios 4096 Jan 19 17:50 .
drwxr-xr-x. 8 root   root   4096 Jan 19 17:49 ..
-rw-r--r--. 1 apache nagios  744 Jan 13 16:56 cgi.cfg
drwxrwxr-x. 2 apache nagios 4096 Jan 13 16:59 hosts
drwxrwxr-x. 2 nagios nagios 4096 Jan 19 17:52 import
-rw-r--r--. 1 apache nagios 5670 Jan 13 16:56 nagios.cfg
-rw-rw-r--. 1 apache nagios 2229 Jan 19 17:51 ndo2db.cfg
-rw-rw-r--. 1 apache nagios 4827 Jan 19 17:51 ndomod.cfg
-rw-rw-r--. 1 apache nagios 7988 Jan 13 16:56 nrpe.cfg
-rw-rw-r--. 1 apache nagios 5345 Jan 13 16:56 nsca.cfg
drwxr-xr-x. 4 nagios nagios 4096 Jan 19 17:50 pnp
-rw-r--r--. 1 apache nagios  210 Jan 13 16:56 resource.cfg
-rw-rw-r--. 1 apache nagios 1627 Jan 13 16:56 send_nsca.cfg
drwxrwxr-x. 2 apache nagios 4096 Jan 13 16:59 services
drwxrwxr-x. 2 nagios nagios 4096 Jan 19 17:51 static
System Information:

Code: Select all

Nagios XI - System Info

System:

Nagios XI Version : 5.4.0
xxx 2.6.32-642.6.2.el6.x86_64 x86_64
Red Hat Enterprise Linux Server release 6.8 (Santiago)
Gnome is not installed
Apache Information

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Server Name: [IP]
Server Address: [IP]
Server Port: 80
Date/Time

PHP Timezone: America/New_York 
PHP Time: Wed, 15 Feb 2017 11:58:15 -0500
System Time: Wed, 15 Feb 2017 16:58:15 +0000
Nagios XI Data

License ends in: 

Days left in Trial: 34

No lock file found in /usr/local/nagios/var/nagios.lock
NPCD not running.
ndo2db (pid 30093) is running...
CPU Load 15: 0.56 
Total Hosts: 0 
Total Services: 0 
Function 'get_base_uri' returns: http://[IP]/nagiosxi/
Function 'get_base_url' returns: http://[IP]/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://[IP]/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Any help would be greatly appreciated. Thank you in advance!

Re: Fails To Start System Components After Install

Posted: Wed Feb 15, 2017 12:32 pm
by rkennedy
Can you post your full install.log that was created when you initially installed? Also, what is the output of getenforce?

Upgrading to 5.4.2 may help as well, there were a couple related graphical errors fixed in this latest version.

Re: Fails To Start System Components After Install

Posted: Wed Feb 15, 2017 12:44 pm
by iMpulse
Thank you for looking into this.

SELinux is currently permissive.

Code: Select all

[root@xxx ~]# getenforce
Permissive
I don't see an install.log available from Nagios:

Code: Select all

[root@xxx ~]# updatedb
[root@xxx ~]# locate install.log
/opt/splunkforwarder/var/log/splunk/first_install.log
/root/install.log
/root/install.log.syslog
/var/log/puppet_agent_install.log
/var/log/splunk-agent-install.log
/var/log/vmware-install.log
/var/log/VRTSpbx/vrtspbx_install.log
/var/log/puredisk/2016-06-01_17:09-pdde-install.log
If updating to the next version is recommended, I can do that as my next step. I haven't removed any of the install files; I'm unsure as to why the log does not exist.

Re: Fails To Start System Components After Install

Posted: Wed Feb 15, 2017 12:54 pm
by rkennedy
What folder did you install nagiosxi from? Should be in there -

Code: Select all

[root@xi nagiosxi]# head install.log
Nagios XI Installation Log
==========================
DATE: Wed Feb  8 14:34:51 EST 2017

DISTRO INFO:

[root@xi ~]# locate install.log
/root/nagiosxi/install.log

updatedb might help? :)

There were a couple odd issues with 5.4.0 so upgrading would help. I have seen configuration management software modify files / permissions that affect XI in the past too.

Can you post a profile? (Admin -> System Profile -> Download Profile) and also a copy of your /etc/sudoers file? Still would like to see your install.log if you can find it, as this may be the key to what's going on.

Re: Fails To Start System Components After Install

Posted: Mon Feb 20, 2017 8:28 am
by iMpulse
This system was installed offline using this guide, so initially under /tmp/rpms. We are currently on the latest version available for offline.

I set up an install session with a Nagios support tech, during which time we reverted back to a base VM and did the offline install from scratch. He verified that no install.log appears to be created after installation, and that there is some issue with a few of the core components when using the offline install. I was advised that the issue would be looked into further and I would receive notice if a resolution was discovered.

For the time being, I'll be installing in Dev using the online method for our trial, and will look into the offline install again if we decide to purchase XI and use in our post-Dev environments. I will update this thread if I hear back on the resolution for the offline issue.

Thanks again for looking into this!

Re: Fails To Start System Components After Install

Posted: Mon Feb 20, 2017 3:36 pm
by tgriep
In the folder you downloaded and extracted the offline files, can you run the following command and post the output so we can view it?

Code: Select all

rpm -i --test -vv nagiosxi-5-3.3.el6.x86_64.rpm
You are correct, running the fullinstall script will not create a log file but the above will print debugging information and we can see what the error is and see about getting it fixed.