Bug 781526

Summary: ddclient won't start correctly with systemctl: Failed to read PID file /var/run/ddclient/ddclient.pid after start. The service might be broken.
Product: [Fedora] Fedora Reporter: Steve <smithsg>
Component: ddclientAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: aslanidis, bugzilla-redhat, h1k6zn2m, kenkolden, redhat-bugzilla, starovoytov, thomas
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-15 15:19:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve 2012-01-13 16:34:37 UTC
Description of problem:
When running "service ddclient start", /var/log/messages receives this error:
Failed to read PID file /var/run/ddclient/ddclient.pid after start. The service might be broken.

If I run ddclient from the command line, it starts fine and runs in the background correctly.  Perhaps this could be a problem with systemctl looking in the wrong place for the PID file.

Version-Release number of selected component (if applicable):
ddclient-3.8.0-4.fc15.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. Run "service ddclient start"
2. Look in the logs (/var/log/messages) and search for ddclient
3. ps aux | grep ddclient
  
Actual results:
logs give the error message: Failed to read PID file /var/run/ddclient/ddclient.pid after start. The service might be broken.

ps aux does not show ddclient running

Expected results:
ddclient is running with no error messages in the logs

Additional info:

I think just converting the service to use systemctl natively instead of the SystemV workaround would clear this up.  I have been looking into it, but I am not enough of an expert in the new systemctl style to be able to suggest a solution yet.

Comment 1 Ken Kolden 2012-02-01 04:11:24 UTC
Duplicate of Bug 734273

Comment 2 Ioannis Aslanidis 2012-03-08 00:07:52 UTC
I do not think this is a duplicate. The durectory /var/run/ddclient exists.

Comment 3 Artem Starovoytov 2012-03-08 15:16:09 UTC
There seems to be at least two more issues with ddclient on Fedora 16:

1) Init script is exiting after the Network Manager check.

May be, this is why we see "Failed to read PID file" failure.


2) When I commented out the check, ddclient started but failed to enter correct IP in the .cache file.  I had to add "-use if -if ppp0" in the /etc/sysconfig/ddclient OPTIONS string.

Comment 4 Ioannis Aslanidis 2012-03-09 00:31:58 UTC
Is there any easy way to work around problem 1?

Comment 5 Artem Starovoytov 2012-03-09 04:03:14 UTC
Well, there is line in /etc/init.d/ddclient that checks for 'network' and NetworkManager files under /var/lock/subsys/, and the files are not there although my network is up. I am not a Linux expert, I do not know where is the right place to check, I just commented out this line.

Have to admit, I am still looking into item 2: ddclient is running but not reporting the IP, I guess config is still incorrect.

Comment 6 Artem Starovoytov 2012-03-10 03:11:37 UTC
OK, here is why "-use if" does not work in /etc/sysconfig/ddclient: the way /usr/sbin/ddclient reads configuration, default "use=ip" takes priority even if "-use if" is passed on a command line.  My ddclient is finally doing the job after adding ",use=if" in /etc/ddclient.conf server/host entry.

Comment 7 Jonathan Kamens 2012-05-15 15:19:58 UTC

*** This bug has been marked as a duplicate of bug 656572 ***