Nagios service startup error


#1

System info:
CentOS 4.2 (RHEL4)
nagios-2.0-0.b6.1.2.el4.test
nagios-plugins-1.4-2.2.el4.rf

ERROR when I manually start the service (Service will not start on bootup):
service nagios start
Starting network monitor: nagios
Your default context is user_u:system_r:unconfined_t.

Do you want to choose a different one? [n]

If I select “n” it starts Nagios and everything works, but if I reboot the system it will not start without me manually starting it and selecting “n”

This is what is listed in the nagios.log after starting it manually:

[1138301085] Nagios 2.0b6 starting… (PID=15342)
[1138301085] LOG VERSION: 2.0
[1138301085] Finished daemonizing… (New PID=15343)

Anyone have any ideas what I may have wrong or need to fix?

Thanks in advance…

-=Tyr
Edited ]


#2

Turn off Selinux and try again.


#3

Selinux was set to permissive (/etc/selinux/confi)
I set it to disabled, do I have to reboot or is there a way to restart the daemon or something? If I can avoid rebooting that would be best, I have users on the server.


#4

/etc/rc.d/init.d/nagios restart


#5

no I mean to turn off SELinux


#6

Well I gave up and rebooted. That made SELinux read the config and set it to disabled.

IT WORKED! :slight_smile:

Thanks for your help


#7

getenforce
is ???
if enabled then:
setenforce 0
modify /etc/selinux/config in order to stay that way, if you reboot.
But it appears, you don’t need to reboot, unless it complained.

But since you where not enabled to start with, then this is mute.


#8

how did you install nagios? I’m running Centos also, and haven’t seen your error at all.


#9

Doesn’t the chkconfig command work on CentOS? I figured it would, since I have it on FC4, which also branches from RH, though a different version. That’s the command I use to make sure services start on reboot. I don’t have to disable SELinux to do it, either. For example:

chkconfig nagios on

Or mayhap I’m misreading the issue…

I don’t suppose it matters now anyways, since you got it to start up like you wanted it to.