Bug 1291555 - Nagios 4.0.8 won't write pid to predefined pidfile
Summary: Nagios 4.0.8 won't write pid to predefined pidfile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Scott Wilkerson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-15 06:54 UTC by Peter Bieringer
Modified: 2016-01-21 04:39 UTC (History)
9 users (show)

Fixed In Version: nagios-4.0.8-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-21 04:39:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Bieringer 2015-12-15 06:54:22 UTC
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-30 02:28:06 UTC
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 2016-01-01 04:21:06 UTC
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-21 04:39:03 UTC
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.