[launchd-dev] correctly running service still getting 'Service only ran for 0 seconds.' log entries

Axel Luttgens axel.luttgens at skynet.be
Tue May 26 23:40:27 PDT 2015


> Le 27 mai 2015 à 04:53, Todd Wade a écrit :
> 
> 
> Hello,
> 
> I put http://paste.scsys.co.uk/483275 at /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist and it started apache, but Server.app keeps logging 'com.apple.xpc.launchd[1] (homebrew.mxcl.httpd24): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.'
> 
> Why is launchd trying to restart its target when it is already running?

Hello Todd,

This is very likely because your plist starts apache thru apachectl, which quits as soon as it has done its job; as a result, launchd tries to reload the job (ie apachectl) it is supposed to keep alive.

HTH,
Axel




More information about the launchd-dev mailing list