Permission denied nrpe error

Mukarram Syed muksyed at yahoo.com
Tue Nov 16 20:51:53 CET 2004


Thanks Marc for your response.  I changed the
following:

Here is my new /etc/xinetd.d/nrpe file

-rw-r--r--    1 root     root          427 Nov 16
14:23 nrpe

# default: on
 # description: NRPE
 service nrpe
 {
         flags           = REUSE
         socket_type     = stream
         wait            = no
         user            = nagios
         server          =
/usr/local/etc/nagios/libexec/nrpe
         server_args     = -i
/usr/local/etc/nagios/etc/nrpe.cfg
         log_on_failure  += USERID
         disable         = no
         only_from       = 127.0.0.1 10.0.250.20
 }

I changed the path of the nrpe.cfg file and put the
file name.  When I do this from the remote host
(nagios server, gaia):

gaia# ./check_nrpe -H triton -p 5666
CHECK_NRPE: Error receiving data from daemon.

On the client (triton), I am getting the following
errors in the /var/log/messages:

Nov 16 14:40:11 triton nrpe[31973]: Unable to open
config file '//nrpe.cfg' for reading 
Nov 16 14:40:11 triton nrpe[31973]: Config file
'//nrpe.cfg' contained errors, bailing out...

Here is the permissions on the nrpe.cfg (it is set to
777):

[root at triton xinetd.d]# cd /usr/local/etc/nagios/etc
[root at triton etc]# ls -lart
total 12
drwxr-xr-x    4 nagios   root         4096 Nov 16
14:21 ..
-rwxrwxrwx    1 nagios   root          605 Nov 16
14:21 nrpe.cfg
drwxrwxrwx    2 nagios   root         4096 Nov 16
14:22 .

Also, I read in the users list that it could be a
problem with the checkcommands.cfg file.  Here is
mine:

# 'check_nrpe' command definition
define command{
        command_name    check_nrpe
        command_line   
/usr/local/etc/nagios/libexec/check_nrpe -H
$HOSTADDRESS$ -C $ARG1$

When I run the following command from gaia (server) to
triton (client) is get the output as shown:
gaia# ./check_nrpe -H triton -p 5666
CHECK_NRPE: Error receiving data from daemon.

Help is appreciated.

Thanks

-Mukarram Syed.

--- Marc Powell <marc at ena.com> wrote:

> 
> 
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of Mukarram
> Syed
> > Sent: Tuesday, November 16, 2004 12:56 PM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] Permission denied nrpe
> error
> > 
> > Hi,
> > I am getting the following error when I run telnet
> to
> > port 5666 to use nrpe:
> > 
> > [root at triton libexec]# telnet triton 5666
> > Trying 10.0.250.100...
> > Connected to triton (10.0.250.100).
> > Escape character is '^]'.
> > Connection closed by foreign host.
> > 
> > In the /var/log/messages I am getting this:
> > 
> > Nov 16 13:49:30 triton xinetd[30641]: execv(
> > /usr/local/etc/nagios/libexec ) failed: Permission
> > denied (errno = 13)
> 
> Why are you trying to run a directory? It should be
> a program.
> 
> > 
> > This is the nrpe file in the /etc/xinetd.d
> directory:
> > # default: on
> > # description: NRPE
> > service nrpe
> > {
> >                 disable         = no
> >                 id              = nrpe
> >                 socket_type     = stream
> >                 flags           = REUSE
> >                 protocol        = tcp
> >                 wait            = no
> >                 user            = root
> >                 server          =
> > /usr/local/etc/nagios/libexec
> >                 server_args     = -i
> > /usr/local/etc/nagios/libexec
> >                 log_on_failure  += USERID
> > }
> 
> Ah, that's why. Per the NRPE documentation you
> should probably be using
> something like
> 		server = /path/to/nrpe
> 		server_args = -i /path/to/nrpe.cfg
> 
> Also, running nrpe as root probably isn't a good
> idea. Try the user that
> nagios runs as.
> 
> > 
> > Nrpe is listening on port 5666:
> > 
> > [root at triton poseidon]# netstat -a |grep nrpe
> > tcp        0      0 *:nrpe                  *:*
> >              LISTEN
> > 
> 
> Actually, xinetd is listening and only on a
> connection attempt will it
> pass it off to nrpe.
> 
>  
> > Can any of you please tell me what's wrong.  Any
> > suggestions why I am getting permission denied
> errors.
> 
> Yes, see above.
> 
> --
> Marc 
> 
> 


=====
Mukarram Syed
muksyed at yahoo.com


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list