Nagios services startup issue using sudo

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Nagios services startup issue using sudo

Post by rajasegar »

NagiosXI 2014R1.2
RHEL 6.5 64bit
DB Offloaded
check_gearman: version 1.4_nagios4 running on libgearman 0.25

I have got a very strange problem.
Nagios services does not start up if using root or sudo.
It only works if nagios id is used or Apply Configuration is done from the gui.

The symptoms
1) gearman_top - check_results worker will be 0 if nagios is started using root.
24-10-2014 07-12-33 AM.png
2) Nagios System dashboard. The last 3 indicators will be blue which is active host checks, service checks and notification.
24-10-2014 07-12-55 AM.png
3) No relevant error messages in any logs.

Does anyone have any clue about this issue?
Did a remote support with the nagios team sometime back and they have no clue either.
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios services startup issue using sudo

Post by lmiltchev »

Let's clarify - if you are logged in as root, you are not able to stop/start/restart service?

Code: Select all

# service nagios stop
# service nagios start
# service nagios restart
What is the output of the following commands?

Code: Select all

echo $PATH
grep root /etc/passwd
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios services startup issue using sudo

Post by rajasegar »

lmiltchev wrote:Let's clarify - if you are logged in as root, you are not able to stop/start/restart service?

Code: Select all

# service nagios stop
# service nagios start
# service nagios restart
What is the output of the following commands?

Code: Select all

echo $PATH
grep root /etc/passwd
If logged on using root. All the nagios service stop, start & restart executes fine without error.
However the start command does not start the services properly.
No idea what service is not started but gearman check_results will be 0.
All other services starts up fine using sudo.

Code: Select all

[nagios@nagiosprodxi1 ~]$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/nagios/bin

[root@nagiosprodxi1 ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

[root@nagiosprodxi1 ~]# grep root /etc/passwd
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
[root@nagiosprodxi1 ~]#

5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Nagios services startup issue using sudo

Post by cmerchant »

Please open an email support ticket at [email protected] and send us your profile.zip.
Admin --> System Profile --> Download Profile
Thanks.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios services startup issue using sudo

Post by rajasegar »

cmerchant wrote:Please open an email support ticket at [email protected] and send us your profile.zip.
Admin --> System Profile --> Download Profile
Thanks.
I am creating a duplicate VM for troubleshooting the upgrade issue.
Will open a ticket once it is ready to troubleshoot 2 issues at the same time.
It might be related.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios services startup issue using sudo

Post by sreinhardt »

Sounds great, thanks raja!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked