Stumper? bug? nsca daemon & ext. cmd. file -- not a permission issue?

Karl Ehr kehr02 at yahoo.com
Tue Jan 7 16:03:03 CET 2003


I have a hacker challenge -- maybe...

I've read the phobic posts about Red Hat 8.0, but I
haven't seen anything that looks like my problem, RH
8.0 or otherwise:

My problem is that the nsca daemon, when handling a
remote network request from send_nsca, gives the
following error:

 
Jan  7 08:27:38 XXXX nsca[8827]: Handling the
connection...
Jan  7 08:27:38 XXXX nsca[8827]: SERVICE CHECK -> Host
Name: 'laptop', Service Description: 'BOGUS', Return
Code: '2', Output: 'Error Message goes here'
Jan  7 08:27:38 XXXX nsca[8827]: Command file
'/usr/local/nagios/var/rw/nagios.cmd ' does not exist,
attempting to use alternate dump file
'/usr/local/nagios/var/rw/nsca.dump' for output
Jan  7 08:27:38 XXXX nsca[8827]: Could not open
alternate dump file
'/usr/local/nagios/var/rw/nsca.dump' for appending
Jan  7 08:27:38 XXXX nsca[8827]: End of connection...

I've configured the user/group for both nagios and the
nsca daemons to be 'nagios/nagios'.   All of
/usr/local/nagios is user/group nagios.nagios.   The
permissions are correct (I'm 99%) sure, because all of
the external command CGI's work perfectly; also, su-ed
to the nagios user, I can echo commands >> to the
/usr/local/nagios/var/rw/nagios.cmd file and they show
up fine both in the log and in the web interface....

I have tried compiling the 1.06b and 1.0 versions of
nagios, the 2.1 and latest CVS build of nsca,
mix-matching them in all combinations.   I have set
the permissions on the "rw" directory both by hand
(setting the group, the S bit on the group level,
etc...) and with the "install-commandmode" make
option;  I've also tried chmoding the file with "chmod
777" after it gets created when nagios starts and
there is the same error.  

The fact that I can echo commands in locally as the
"nagios" user and get good results seems to probably
show that its neither a permissions issue or anything
with the passive/external command interface.   Maybe
this is a bug with nsca itself?

As an aside, I cannot get the alternate dump file to
work either.   Touching the nagios.dump file ahead of
time, and setting wide open permissions makes no
difference.   (I'm assuming that the dump file is
supposed to be a regular text file -- not a FIFO named
pipe like the command file, right??)

I'm stumped... but I'm also surprised that I'm seeing
something that hasn't popped up for someone else
already.  Any help will bring you praise, beer, pizza,
cookies or whatever tithe you demand.  TIA,

Karl

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list