Good Evening
im relatively a newbie at nagios and Linux platforms in General. I have just installed Nagios on my Ubuntu version 14.04.3 LTS server. I can launch it on the browser but then there is a big red cross that says Not running after I successfully login.
When I run:
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get the below output:
Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 25 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
and when I run: service nagios status
nagios is not running
when I run: service nagios start
Starting nagios: done.
BUT it keeps showing: service nagios status
nagios is not running
Even after I try to start it several times.
Yur speed assistance wuld be much appreciated.
New install Nagios failing to run
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: New install Nagios failing to run
What does the nagios log say? Typically it is located at /usr/local/nagios/var/nagios.log and perhaps more info would be in /var/log/syslog.
Previous Nagios employee
Re: New install Nagios failing to run
Hello Avandemore
I'm seeing this on the logs at /usr/local/nagios/var/nagios.log
[1495815769] Nagios 4.3.2 starting... (PID=3488)
[1495815769] Local time is Fri May 26 18:22:49 CAT 2017
[1495815769] LOG VERSION: 2.0
[1495815769] qh: Failed to init socket '/usr/local/nagios/var/rw/query.sh'. bind() failed: No such file or directory
[1495815769] Error: Failed to initialize query handler. Aborting
[1495817115] Nagios 4.3.2 starting... (PID=8695)
[1495817115] Local time is Fri May 26 18:45:15 CAT 2017
[1495817115] LOG VERSION: 2.0
[1495817115] qh: Failed to init socket '/usr/local/nagios/var/rw/query.sh'. bind() failed: No such file or directory
[1495817115] Error: Failed to initialize query handler. Aborting
I'm seeing this on the logs at /usr/local/nagios/var/nagios.log
[1495815769] Nagios 4.3.2 starting... (PID=3488)
[1495815769] Local time is Fri May 26 18:22:49 CAT 2017
[1495815769] LOG VERSION: 2.0
[1495815769] qh: Failed to init socket '/usr/local/nagios/var/rw/query.sh'. bind() failed: No such file or directory
[1495815769] Error: Failed to initialize query handler. Aborting
[1495817115] Nagios 4.3.2 starting... (PID=8695)
[1495817115] Local time is Fri May 26 18:45:15 CAT 2017
[1495817115] LOG VERSION: 2.0
[1495817115] qh: Failed to init socket '/usr/local/nagios/var/rw/query.sh'. bind() failed: No such file or directory
[1495817115] Error: Failed to initialize query handler. Aborting
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: New install Nagios failing to run
What is the output of ll /usr/local/nagios/var/rw/? You may need to give the nagios user access to the file mentioned in the log.
What's the output of sestatus?
What's the output of sestatus?
Re: New install Nagios failing to run
This is the output for thos commands:
cacti@bofi:/tmp$ sudo ls -l /usr/local/nagios/var/rw/
ls: cannot access /usr/local/nagios/var/rw/: No such file or directory
cacti@bofi:/tmp$ sudo ls -l /usr/local/nagios/var/rw/
ls: cannot access /usr/local/nagios/var/rw/: No such file or directory
cacti@bofi:/tmp$
cacti@bofi:/tmp$ sestatus
SELinux status: disabled
cacti@bofi:/tmp$ sudo ls -l /usr/local/nagios/var/rw/
ls: cannot access /usr/local/nagios/var/rw/: No such file or directory
cacti@bofi:/tmp$ sudo ls -l /usr/local/nagios/var/rw/
ls: cannot access /usr/local/nagios/var/rw/: No such file or directory
cacti@bofi:/tmp$
cacti@bofi:/tmp$ sestatus
SELinux status: disabled
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: New install Nagios failing to run
I am assuming you compiled since you are on 4.3.2. What instructions did you use?
What's the output of this
ls -l /usr/local/nagios/var/
Your log is is in var, so we know you have that. The question is why you don't have rw.
I see you are using a cacti user. I assume cacti is installed on this server? What instructions did you use for that?
Are you just trying to learn or is this a production environment? If you have 7 or less hosts, then you can use Nagios XI for free. We don't support XI installs on Ubuntu though.
What's the output of this
ls -l /usr/local/nagios/var/
Your log is is in var, so we know you have that. The question is why you don't have rw.
I see you are using a cacti user. I assume cacti is installed on this server? What instructions did you use for that?
Are you just trying to learn or is this a production environment? If you have 7 or less hosts, then you can use Nagios XI for free. We don't support XI installs on Ubuntu though.