Project

General

Profile

Actions

Bug #4391

closed

Status | Services | nrpe2 | restart does not restart nrpe

Added by Dan Langille about 9 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
NRPE
Target version:
-
Start date:
02/08/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.2
Affected Plus Version:
Affected Architecture:

Description

On pfSense 2.2, I am unable to restart nrpe2

I click through: Status | Services | nrpe2 | restart service.

The webui says: nrpe2 has been restarted

The logs:

Feb 9 00:15:00 php-fpm92748: /status_services.php: The command '/usr/local/etc/rc.d/nrpe2.sh stop' returned exit code '1', the output was 'nrpe2 not running? (check /var/run/nrpe2.pid).'
Feb 9 00:15:00 nrpe32629: Starting up daemon
Feb 9 00:15:00 nrpe32629: There's already an NRPE server running (PID 39541). Bailing out...

The console show this before restart attempt

ps auwx | grep nrpe
nagios 39541 0.0 0.2 23188 4912 - Is 8:32PM 0:00.31 /usr/local/sbin/nrpe2 -d -c /usr/pbi/nrpe-amd64/etc/nrpe.cfg
root 98802 0.0 0.1 18884 2380 0 S+ 12:14AM 0:00.00 grep nrpe

And this after restart attempt

ps auwx | grep nrpe
nagios 39541 0.0 0.2 23188 4912 - Is 8:32PM 0:00.31 /usr/local/sbin/nrpe2 -d -c /usr/pbi/nrpe-amd64/etc/nrpe.cfg
root 37472 0.0 0.1 18884 2380 0 S+ 12:15AM 0:00.00 grep nrpe

i.e. nil change

Actions #1

Updated by Jim Pingle about 9 years ago

What's in /var/run/nrpe2.pid ? Is the the current PID? If you killall -9 nrpe2; rm /var/run/nrpe2.pid, and then start it fresh, does it work afterward?
If the PID file were stale it might explain the behavior.

Actions #2

Updated by Dan Langille about 9 years ago

I have since done a kill -TERM and then reloaded: /status_services.php?mode=restartservice&service=nrpe2

This started the service.

At present, yes, it contains the right value:

[2.2-RELEASE][admin@bast.int.unixathome.org]/root: cat /var/run/nrpe2.pid 
14372
[2.2-RELEASE][admin@bast.int.unixathome.org]/root: ps auwx | grep nrpe
nagios 14372   0.0  0.2  23188  4916  -  Is   12:22AM     0:00.03 /usr/local/sbin/nrpe2 -d -c /usr/pbi/nrpe-amd64/etc/nrpe.cfg
root   47661   0.0  0.1  18884  2380  0  S+   12:31AM     0:00.00 grep nrpe
[2.2-RELEASE][admin@bast.int.unixathome.org]/root: 

After doing a Restart via Webui, the above output of the above commands is the same as shown above.

Actions #3

Updated by Renato Botelho about 9 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Applied in changeset pfsense-packages:commit:11375fe3e8826e02f7a5bec1f6a2d743060dbd76.

Actions #4

Updated by Renato Botelho about 9 years ago

Applied in changeset pfsense-packages:commit:909f0dfd8a1efc99c8392423123fdc0b3d88ffea.

Actions #5

Updated by Chris Buechler about 9 years ago

  • Project changed from pfSense to pfSense Packages
  • Category set to NRPE
Actions #6

Updated by Chris Buechler about 8 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF