Bug 1128259 - nscd systemd unit file looks not properly setting the pidfile
Summary: nscd systemd unit file looks not properly setting the pidfile
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-08 17:39 UTC by Mattieu Puel
Modified: 2014-08-11 07:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-11 07:54:55 UTC

Attachments (Terms of Use)

Description Mattieu Puel 2014-08-08 17:39:57 UTC
Description of problem:

When activated, nscd is not started properly by systemd.                                                                                                                           
It looks like the configured pidfile in the systemd unit does not match                                                                                                                         
the actual one :                                                                                                                                                                                
$ grep PID /usr/lib/systemd/system/nscd.service                                                                                                                                                 
while the file is written in /var/run/nscd/nscd.pid by the daemon.                                                                                                                              
Systemd is then stuck on his waiting for the pid file creation.     

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. systemctl start nscd

Actual results:

systemd[1]: Starting Name Service Cache Daemon...
systemd[1]: PID file /run/nscd/nscd.pid not readable (yet?) after start.
systemd[1]: nscd.service operation timed out. Terminating.
systemd[1]: Failed to start Name Service Cache Daemon.

Expected results:
systemd[1]: Started Name Service Cache Daemon.

Additional info:
Modifying the unit file resolves the issue :
$ sed -i 's@PIDFile=/run/nscd/nscd.pid@PIDFile/var/run/nscd/nscd.pid@'  /usr/lib/systemd/system/nscd.service

Comment 2 Lukáš Nykrýn 2014-08-11 07:18:10 UTC
This is weird, /var/run should be a symlink to /run.
Also you have a typo in your sed expression, there is '=' missing in the second part.

But I have tried nscd on my rhel7 and it simply works out of box.

Comment 3 Mattieu Puel 2014-08-11 07:43:41 UTC
You are right, the problem is my side with a non-existent symlink. I focused on the content of the package. Sorry for your time.

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