correctly running service still getting 'Service only ran for 0 seconds.' log entries
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? Thanks!
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
On 5/27/15 2:40 AM, Axel Luttgens wrote:
Le 27 mai 2015 à 04:53, Todd Wade a écrit : Why is launchd trying to restart its target when it is already running?
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.
Indeed, after I sent this I looked again at the stock apache's .plist and realized the issue was quite obvious. Thanks!
Todd, As of Yosemite, there is a new `launchctl blame` subcommand that you can use to identify why launchd chose to launch a particular service. In your case, the command would be: $ launchctl blame system/homebrew.mxcl.httpd24 -damien On 26 May, 2015, at 19:53, Todd Wade <waveright@gmail.com> wrote:
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?
Thanks!
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev
participants (3)
-
Axel Luttgens
-
Damien Sorresso
-
Todd Wade