No lock file found in /usr/local/nagios/var/nagios.lock

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Muthulinux
Posts: 12
Joined: Tue Sep 15, 2015 2:24 pm

No lock file found in /usr/local/nagios/var/nagios.lock

Post by Muthulinux »

Dear All,

I am getting below message while starting up nagios service on newly installed machine. I did nagios xi 4.2 offline installation on redhat linux 6.5 server.

After the installation i tried to open the web page in the browser http://server ip/nagiosxi but i am getting below message in the browser

"Page NOT found error" then i checked the nagios status in the server and i am receiving below message.

]# service nagios status
No lock file found in /usr/local/nagios/var/nagios.lock
[root@muthunagios etc]# service nagios start
Starting nagios:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://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.

Please could any one help me out on this?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: No lock file found in /usr/local/nagios/var/nagios.lock

Post by rkennedy »

What version of XI did you install? 4.2 doesn't sound right.

Also, what instructions did you follow for the offline install? It looks like the configuration files were not added successfully.
Former Nagios Employee
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No lock file found in /usr/local/nagios/var/nagios.lock

Post by tgriep »

In addition to what rkennedy is asking,
Can you login as root to the server, run the following commands and post the output?

Code: Select all

ls -l /usr/local
ls -l /usr/local/nagios
ls -l /usr/local/nagios/etc/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Muthulinux
Posts: 12
Joined: Tue Sep 15, 2015 2:24 pm

Re: No lock file found in /usr/local/nagios/var/nagios.lock

Post by Muthulinux »

Hello Kenedy,

I followed this document to perform offline nagios xi 4.2 installation

Nagios XI – Installing Nagios XI In An Offline Environment - URL is https://assets.nagios.com/downloads/nag ... onment.pdf

Version - nagiosxi-4-2.6.el6.x86_64.tar.gz

OS version - redhat 6.5

Output of the requested commands:
------------------------------------------
# ls -l /usr/local
total 64
drwxr-xr-x. 2 root root 4096 Apr 28 07:33 bin
drwxr-xr-x. 2 root root 4096 Jun 28 2011 etc
drwxr-xr-x. 2 root root 4096 Jun 28 2011 games
drwxr-xr-x. 2 root root 4096 Jun 28 2011 include
drwxr-xr-x. 2 root root 4096 Jun 28 2011 lib
drwxr-xr-x. 2 root root 4096 Jun 28 2011 lib64
drwxr-xr-x. 2 root root 4096 Jun 28 2011 libexec
drwxr-xr-x. 8 root root 4096 Apr 28 07:30 nagios
drwxr-xr-x. 6 root root 4096 Apr 28 07:31 nagiosmobile
drwxr-xr-x. 3 root root 4096 Apr 28 07:34 nagiosxi
drwxr-xr-x. 5 apache apache 4096 Apr 28 07:31 nagvis
drwxrwxr-x. 7 nagios nagios 4096 Apr 28 07:31 nrdp
drwxrwxr-x. 4 nagios nagios 4096 Apr 28 07:31 nsis
drwxr-xr-x. 2 root root 4096 Jun 28 2011 sbin
drwxr-xr-x. 5 root root 4096 Apr 28 05:16 share
drwxr-xr-x. 2 root root 4096 Jun 28 2011 src

ls -l /usr/local/nagios
total 24
drwxr-xr-x. 2 root root 4096 Apr 28 07:32 bin
drwxrwsr-x. 7 apache nagios 4096 Apr 28 07:32 etc
drwxrwxr-x. 2 nagios nagios 4096 Apr 28 07:33 libexec
drwxrwxr-x. 2 nagios nagios 4096 Apr 28 07:30 sbin
drwxrwxr-x. 14 nagios nagios 4096 Apr 28 07:30 share
drwxrwxr-x. 6 nagios nagios 4096 Apr 28 08:08 var

ls -l /usr/local/nagios/etc/
total 72
-rw-r--r--. 1 nagios nagios 744 Mar 12 2015 cgi.cfg
drwxrwxr-x. 2 apache nagios 4096 Mar 12 2015 hosts
drwxrwxr-x. 2 nagios nagios 4096 Mar 12 2015 import
-rw-r--r--. 1 nagios nagios 5596 Mar 12 2015 nagios.cfg
-rwxrwxr-x. 1 nagios nagios 2229 Apr 28 07:34 ndo2db.cfg
-rwxrwxr-x. 1 nagios nagios 4827 Apr 28 07:34 ndomod.cfg
-rwxrwxr-x. 1 nagios nagios 5596 Mar 12 2015 nrpe.cfg
-rwxrwxr-x. 1 nagios nagios 5596 Mar 12 2015 nsca.cfg
drwxr-xr-x. 4 nagios nagios 4096 Apr 28 07:32 pnp
-rw-r--r--. 1 nagios nagios 210 Mar 12 2015 resource.cfg
-rwxrwxr-x. 1 nagios nagios 5596 Mar 12 2015 send_nsca.cfg
drwxrwxr-x. 2 apache nagios 4096 Mar 12 2015 services
drwxrwxr-x. 2 nagios nagios 4096 Mar 12 2015 static
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No lock file found in /usr/local/nagios/var/nagios.lock

Post by tgriep »

It looks like the install didn't finish.
Can you go to this folder /tmp/rpms and post the fullinstall.log here so we can review it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked