/var/run/nrpe.pid privileges

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
digitalbennu
Posts: 20
Joined: Fri Apr 19, 2013 10:46 am

/var/run/nrpe.pid privileges

Post by digitalbennu »

8/12/13 10:29:42.541 PM nrpe[1312]: Starting up daemon
8/12/13 10:29:42.541 PM nrpe[1312]: Cannot write to pidfile '/var/run/nagios/nrpe.pid' - check your privileges.
8/12/13 10:29:42.542 PM nrpe[1312]: Warning: Could not set effective GID=11
8/12/13 10:29:42.543 PM nrpe[1312]: Warning: Unable to change supplementary groups using initgroups()
8/12/13 10:29:42.543 PM nrpe[1312]: Warning: Could not set effective UID=11
8/12/13 10:29:42.543 PM nrpe[1312]: Network server bind failure (48: Address already in use)

Running on Mac O/S X 10.8 server. I am seeing these every few second in my logs. I followed instructions in a previous post that I had hoped would fix the problem by moving the nrpe.pid file. No good. This machine also has a problem with memory to 96% every few hours after restart.

Thanks for help in advance.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: /var/run/nrpe.pid privileges

Post by slansing »

Please share the output of the following, run this command but change it's directory to that of your nrpe.cfg file:

Code: Select all

grep pid /etc/nagios/nrpe.cfg
How did you install NRPE on this OS/X system? Did you by chance copy it from another installation?
digitalbennu
Posts: 20
Joined: Fri Apr 19, 2013 10:46 am

Re: /var/run/nrpe.pid privileges

Post by digitalbennu »

Sorry since this is a mac install the command you sent did not work. I did modify to "grep pid /usr/local/nagios/etc/nrpe.cfg
Below the output

focusbh:~ admin$ grep pid /usr/local/nagios/etc/nrpe.cfg
pid_file=/var/run/nagios/nrpe.pid
focusbh:~ admin$

This was installed from the Nagios server using the Monitoring Wizard. Not copied from another install.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: /var/run/nrpe.pid privileges

Post by abrist »

Can we get a listing of that pid (checking permissions):

Code: Select all

ls -la /var/run/nagios/nrpe.pid
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
digitalbennu
Posts: 20
Joined: Fri Apr 19, 2013 10:46 am

Re: /var/run/nrpe.pid privileges

Post by digitalbennu »

Below is the result of the command.....

focusbh:~ admin$ ls -la /var/run/nagios/nrpe.pid
ls: /var/run/nagios/nrpe.pid: No such file or directory
focusbh:~ admin$

Whats next?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: /var/run/nrpe.pid privileges

Post by slansing »

You will need to find the location of the nrpe.pid file and change the following path in the .cfg file to the correct one:

Code: Select all

pid_file=/var/run/nagios/nrpe.pid
Any idea of where the nrpe.pid is residing?
digitalbennu
Posts: 20
Joined: Fri Apr 19, 2013 10:46 am

Re: /var/run/nrpe.pid privileges

Post by digitalbennu »

Ok...sounds like we are going in circles and I was first asked for the location of the PID file in the .cfg and then checked the location of the PID file and then we are back to asking the location of the PID file.

The script says the PID file should be
/var/run/nagios/nrpe.PID...I changed it from the default (following instructions from someone else having the same problem) for /var/run/nrpe.PID...

You have asked me to check the permissions on the /var/run/nagios/nrpe.pid and I do not have that file. It sounds like it is not being created when NRPE runs.

Am I correct so far?

Whats the new step in fixing this problem?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: /var/run/nrpe.pid privileges

Post by slansing »

I asked you to check the location of the pid, and see what was defined in the nrpe.cfg, now that showed me that either the nrpe.PID is not getting created, or, you have the wrong directory defined in the .cfg so you will need to find where the nrpe.pid file is located and change that directory as stated above.......

Lets back up one directory checking for permissions on /var/run and /var/run/nagios:

Code: Select all

ll -la /var/run/nagios/

ll -la /var/run/
monroviaunified
Posts: 1
Joined: Tue Sep 18, 2012 1:54 pm

Re: /var/run/nrpe.pid privileges

Post by monroviaunified »

I am having a very similar issue. However the nrpe.pid file does not exist on my Macs. the

Code: Select all

sudo find . -name 'nrpe.pid' -print"
retunes nothing. How do I create the nrpe.pid file.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: /var/run/nrpe.pid privileges

Post by slansing »

This should be created when a NRPE process is spawned, how are you initializing NRPE on your mac systems?
Locked