Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2008 15:41:28 GMT
From:      Tyler Aviss <a-freebsd@phormix.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/127444: nagios-statd port RC script fails to log a valid PID, cannot detect running instance
Message-ID:  <200809171541.m8HFfSCs054307@www.freebsd.org>
Resent-Message-ID: <200809171550.m8HFo3Yb091356@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         127444
>Category:       misc
>Synopsis:       nagios-statd port RC script fails to log a valid PID, cannot detect running instance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 17 15:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tyler Aviss
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD sweb1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Wed Jul  4 12:12:47 EDT 2007     root@sweb1:/usr/obj/usr/src/sys/SMP-DL360  i386
>Description:
nagios-statd does not appear to by default create a pidfile (or not in the location the rc script expects).

Starting nagios-statd via /usr/local/etc/rc.d/nagiosstatd will therefore launch the daemon, but not create a PIDfile. This in turn means that attempting to start or restart the daemon via the RC script will fail, as it does not detect a running instance.
>How-To-Repeat:
$ /var/run$ /usr/local/etc/rc.d/nagiosstatd start
Starting nagiosstatd.
$ ps auxwww | grep statd
root    68885  0.0  0.2  5140  3696  ??  Ss   11:30AM   0:00.04 python /usr/local/sbin/nagios-statd
$ ls /var/run/nagiosstatd.pid
ls: /var/run/nagiosstatd.pid: No such file or directory
$ /var/run$ /usr/local/etc/rc.d/nagiosstatd restart
nagiosstatd not running?
Starting nagiosstatd.
Port 1040 is already in use.  Unable to bind - exiting.

Manually adding a "-P /var/run/nagiosstatd.d" will create the pidfile, but a stop/restart will still complain that the daemon is not running (even when it is, and the pidfile contains a valid process-id for statd)
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809171541.m8HFfSCs054307>