nrpe server starts too early and fails to bind on IP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nagios-nrpe (Debian) |
Fix Released
|
Unknown
|
|||
nagios-nrpe (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When the bind address specified in nrpe.cfg is not available and the binding fails at startup, the startup/init script says that the service was successfully started but really it was not. The server does not stay resident and retry the bind. Therefore, I believe the proper behavior here should be to report a failure.
Steps to reproduce:
apt-get install nagios-nrpe-server
nano /etc/nagios/
[change the bind address to one the system doesn't currently have, thus the binding will fail]
service nagios-nrpe-server restart
Expected results:
init script reports [failed] like other services when they fail to start.
Actual results:
init script reports [OK], but service is not running. /var/log/syslog contains the following:
Aug 31 18:24:35 ito nrpe[19683]: Starting up daemon
Aug 31 18:24:35 ito nrpe[19683]: Network server bind failure (99: Cannot assign requested address)
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nagios-nrpe-server 2.12-4ubuntu1
ProcVersionSign
Uname: Linux 2.6.38-8-server x86_64
Architecture: amd64
Date: Wed Aug 31 18:29:46 2011
InstallationMedia: Ubuntu-Server 11.04 "Natty Narwhal" - Release amd64 (20110426)
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: nagios-nrpe
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in nagios-nrpe (Debian): | |
status: | Unknown → New |
Changed in nagios-nrpe (Debian): | |
status: | New → Fix Released |
I confirmed this on a Lucid container. Setting "server_ address= 1.2.3.4" and starting/restarting nagios-nrpe-server reports no error but the log says otherwise :
# /etc/init. d/nagios- nrpe-server start
Starting nagios-nrpe: nagios-nrpe.
# echo $?
0
# tail -n2 /var/log/daemon.log
Oct 25 10:54:36 server1030 nrpe[20150]: Starting up daemon
Oct 25 10:54:36 server1030 nrpe[20150]: Network server bind failure (99: Cannot assign requested address)
# lsb_release -rd
Description: Ubuntu 10.04.3 LTS
Release: 10.04
# apt-cache policy nagios-nrpe-server 10.04.1 10.04.1 10.04.1 0 archive. ubuntu. com/ubuntu/ lucid-updates/main Packages dpkg/status archive. ubuntu. com/ubuntu/ lucid/main Packages
nagios-nrpe-server:
Installed: 2.12-4ubuntu1.
Candidate: 2.12-4ubuntu1.
Version table:
*** 2.12-4ubuntu1.
500 http://
100 /var/lib/
2.12-4ubuntu1 0
500 http://