Page 1 of 2

nrpe configuration problem on macosx

Posted: Fri Feb 21, 2014 12:02 pm
by davide.bonicelli
hi, i'm trying to install nrpe demon on a macosx 10.6.8 Server.
Prerequisites are ok and install seems to go ok, but i can't see the process active and in the system log i see:
xserve2011 com.apple.launchd[1] (org.nagios.nrpe[1380]): getgrnam("anAppropriateGroup") failed
i modified by hand the file
/Library/LaunchAgents/org.nagios.nrpe.plist
the 'group' item to anAppropriateGroup to nagios, but nothing change.
at last, i see that
/usr/local/nagios/bin/
it's empty...so any suggest to start debugging?

Re: nrpe configuration problem on macosx

Posted: Fri Feb 21, 2014 2:49 pm
by abrist
Can you post the output of the configure and make?

Re: nrpe configuration problem on macosx

Posted: Sat Feb 22, 2014 12:10 pm
by davide.bonicelli
i used the full install command like on this doc:
http://exchange.nagios.org/directory/Do ... nt/details

Re: nrpe configuration problem on macosx

Posted: Mon Feb 24, 2014 10:36 am
by tmcdonald
Can you post the output of the fullinstall command?

Re: nrpe configuration problem on macosx

Posted: Tue Feb 25, 2014 7:28 am
by davide.bonicelli
yes, sorry...here is the result of a relaunch of the fullinstall command:
xserve2011:macosx ladmin$ sudo ./fullinstall
Password:
Mac OSX Agent
Current step is 0-usersgroups

User name already exists: nagios
Skipping...

0-usersgroups appears to have already completed successfully. Moving on to the next step.
Current step is 1-services
/etc/services updated
1-services appears to have already completed successfully. Moving on to the next step.
Current step is A-subcomponents
./A-subcomponents: line 23: ./install: No such file or directory
Subcomponents installation failed - exiting
A-subcomponents appears to have already completed successfully. Moving on to the next step.
Starting NRPE Agent

##########################################################
### ###
### Nagios Mac OSX Agent Installation Complete! ###
### ###
##########################################################

If you experience any problems, please attach the file logs-all-steps-1393331131.tar.gz that was just created to any support requests.

Re: nrpe configuration problem on macosx

Posted: Tue Feb 25, 2014 2:42 pm
by lmiltchev
Have you tried restarting the macosx box? I've seen case, where nrpe would not start until the server is restarted - not sure if this is a bug, or something "environment-specific".

Re: nrpe configuration problem on macosx

Posted: Thu Feb 27, 2014 3:01 am
by davide.bonicelli
ok, i tried to reboot the mac and now the install process look better..here is the install log
logs-all-steps-1393434059.tar.gz
.
now i see the process nrpe active, but i try telnet ip_mac 5666 the connection is closed by the host.
with tail /var/log/system i see
Feb 27 08:57:45 xserve2011 com.apple.launchd.peruser.501[584] (org.nagios.nrpe): Throttling respawn: Will start in 10 seconds
Feb 27 08:57:45 xserve2011 nrpe[77438]: Starting up daemon
Feb 27 08:57:45 xserve2011 nrpe[77438]: Cannot write to pidfile '/var/run/nrpe.pid' - check your privileges.
Feb 27 08:57:45 xserve2011 nrpe[77438]: Warning: Could not set effective GID=11
Feb 27 08:57:45 xserve2011 nrpe[77438]: Warning: Unable to change supplementary groups using initgroups()
Feb 27 08:57:45 xserve2011 nrpe[77438]: Warning: Could not set effective UID=11
Feb 27 08:57:45 xserve2011 nrpe[77438]: Network server bind failure (48: Address already in use)
Feb 27 08:57:52 xserve2011 com.apple.launchd[1] (org.nagios.nrpe[77440]): getgrnam("anAppropriateGroup") failed
Feb 27 08:57:52 xserve2011 com.apple.launchd[1] (org.nagios.nrpe[77440]): Exited with exit code: 1

still investigating....

Re: nrpe configuration problem on macosx

Posted: Thu Feb 27, 2014 4:30 am
by davide.bonicelli
ok, i created /var/run/nagios/nrpe.pid, chowned and chrooted to the user nagios and modified the nrpe.cfg to link to the right location of nrpe.pid.
i still have the error with the 'anappropriate group', but there is no more the nagios plist in /System/Library/LaunchAgents! grrrr
i can't understand how the nrpe daemon is launched...

log:
Feb 27 10:29:32 xserve2011 com.apple.launchd.peruser.501[584] (org.nagios.nrpe): Throttling respawn: Will start in 10 seconds
Feb 27 10:29:32 xserve2011 nrpe[81139]: Starting up daemon
Feb 27 10:29:32 xserve2011 nrpe[81139]: Warning: Could not set effective GID=11
Feb 27 10:29:32 xserve2011 nrpe[81139]: Warning: Unable to change supplementary groups using initgroups()
Feb 27 10:29:32 xserve2011 nrpe[81139]: Warning: Could not set effective UID=11
Feb 27 10:29:32 xserve2011 nrpe[81139]: Network server bind failure (48: Address already in use)
Feb 27 10:29:34 xserve2011 com.apple.launchd[1] (org.nagios.nrpe[81140]): getgrnam("anAppropriateGroup") failed

Re: nrpe configuration problem on macosx

Posted: Thu Feb 27, 2014 4:46 am
by davide.bonicelli
blame to me..i'm new with this fxxxxxg macos..it's launched via /etc/services
the strange thing is that with the command launchctld list i see the org.nrpe.pls entry but i can't find the file to edit...also with the find command...

Re: nrpe configuration problem on macosx

Posted: Thu Feb 27, 2014 6:54 am
by davide.bonicelli
so..i commented the line regarding nrpe in /etc/services and created a plist for nrpe and thigs are 'start' to working...