Stumper? bug? nsca daemon & ext. cmd. file -- not a permission issue?
Richard Colley
rcolley at cardaccess.com.au
Wed Jan 15 09:27:55 CET 2003
First, you do realise it is looking in /scale8/nagios for var/rw/nagios.cmd?
Is this just a symlink to /usr/local?
What is the output of the following commands:
ls -ld /scale8
ls -ld /scale8/nagios
ls -ld /scale8/nagios/var
ls -ld /scale8/nagios/var/rw
ls -l /scale8/nagios/var/rw/nagios.cmd
Is the user 'nsca' a member of group 'nagios'? It must be, with the config
you have. What's the output of:
grep nsca /etc/group
... does it include the group 'nagios'?
Richard
-----Original Message-----
From: Karl Ehr [mailto:kehr02 at yahoo.com]
Sent: Wednesday, 15 January 2003 7:14 PM
To: Marc Powell; nagios
Subject: RE: [Nagios-users] Stumper? bug? nsca daemon & ext. cmd. file --
not a permission issue?
Sorry -- had to put this project down for a few
days... Well it's not an issue with the trailing space
(I wish it had been that easy!)
I'm still stuck, but you're question about whether
nsca is running out of inetd or a daemon made me
realize I was running in -s (single) rather than -d
(daemon) mode. I 've fixed that:
nsca 24583 0.0 0.1 1596 668 ? S
02:56 0:00 /usr/local/nagios/bin/nsca -d -c
/usr/local/nagios/etc/nsca.cfg
...But now I get this error in syslog:
Jan 15 03:09:31 sf1nmc1 nsca[24645]: Handling the
connection...
Jan 15 03:09:32 sf1nmc1 nsca[24645]: SERVICE CHECK ->
Host Name: 'laptop', Service Description: 'BOGUS',
Return Code: '2', Output: 'Error Message goes here'
Jan 15 03:09:32 sf1nmc1 nsca[24645]: Could not open
command file '/scale8/nagios/var/rw/nagios.cmd' for
writing
Jan 15 03:09:32 sf1nmc1 nsca[24645]: End of
connection...
Notice the "Could not open" -- This would make it
*seem* more like a permission issue... but honestly,
everyting with the CGI's and echoing directly to the
command file works just fine (as the nagios user, and
as the apache user). Here is my "rw" directory:
[root at XXXX root]# ls -la /usr/local/nagios/var/rw/
total 8
drwxrwsr-x 2 nagios nagios 4096 Jan 15
02:57 .
drwxrwxr-x 4 nagios nagios 4096 Jan 15
03:11 ..
prw-rw---- 1 nagios nagios 0 Jan 15
02:57 nagios.cmd
-rw-r--r-- 1 nagios nagios 0 Jan 7
10:26 nsca.dump
Any other ideas?
Thanks for you help.
--- Marc Powell <mpowell at ena.com> wrote:
> I don't know if it's just a display issue or not but
> this line caught my
> eye:
>
> Jan 7 08:27:38 XXXX nsca[8827]: Command file
> '/usr/local/nagios/var/rw/nagios.cmd '
>
> Note the '<space>' after nagios.cmd. Just seems kind
> of odd to me that
> that would be there. Other than that, does nsca run
> out of (x)inetd or
> as a daemon? For our sake could you do the following
> and resend to the
> list?
>
> ls -la /usr/local/nagios/var/rw
> ps -efwww | grep nsca
>
> Thanks,
>
> Marc
>
> > -----Original Message-----
> > From: Karl Ehr [mailto:kehr02 at yahoo.com]
> > Sent: Tuesday, January 07, 2003 9:03 AM
> > To: nagios
> > Subject: [Nagios-users] Stumper? bug? nsca daemon
> & ext. cmd. file --
> not
> > a permission issue?
> >
> > 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
> > _______________________________________________
> > Nagios-users mailing list Nagios-users at lists.sourceforge.net
> >
>
https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>
>
-------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld =
> Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/nagios-users
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
More information about the Users
mailing list