Bug 1291555 - Nagios 4.0.8 won't write pid to predefined pidfile
Nagios 4.0.8 won't write pid to predefined pidfile
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: nagios (Show other bugs)
epel7
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Scott Wilkerson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 01:54 EST by Peter Bieringer
Modified: 2016-01-20 23:39 EST (History)
9 users (show)

See Also:
Fixed In Version: nagios-4.0.8-2.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-20 23:39:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2015-12-15 01:54:22 EST
Description of problem:
No pidfile is written


Version-Release number of selected component (if applicable):
nagios-4.0.8-1.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
1. restart nagios

Actual results:

ll /var/run/nagios/
total 0

No pidfile written (or updated)


Expected results:
pid written to pidfile


Additional info:

grep lock_file /etc/nagios/nagios.cfg
lock_file=/var/run/nagios.pid

=> only written in daemon mode...


grep -i pid /usr/lib/systemd/system/nagios.service
PIDFile=/var/run/nagios/nagios.pid

=> this option (cleanup of left-over pidfile) is not used in current case because Type=simple according to systemd manual


ll /var/run/ |grep nagios
drwxr-xr-x  2 nagios   nagios       40 15. Dez 07:31 nagios

=> nagios user should be able to create/write a file into directory


I assume problem is that systemd will start nagios in foreground mode, but lock_file is only written in daemon mode by nagios itself

ExecStart=/usr/sbin/nagios /etc/nagios/nagios.cfg


Afair pidfile was written before major update to version 4
Comment 1 Fedora Update System 2015-12-29 21:28:06 EST
nagios-4.0.8-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-eed09b5974
Comment 2 Fedora Update System 2015-12-31 23:21:06 EST
nagios-4.0.8-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-eed09b5974
Comment 3 Fedora Update System 2016-01-20 23:39:03 EST
nagios-4.0.8-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.