[systemd-devel] Service Type for Tomcat
Tomasz Torcz
tomek at pipebreaker.pl
Tue Apr 18 17:51:07 UTC 2017
On Tue, Apr 18, 2017 at 10:44:59AM -0700, Igal @ Lucee.org wrote:
> I've read about the difference between "forking" and "notify", but am not
> sure how it really applies in real life.
>
> Can someone tell me what would be the consequences of setting Tomcat (or any
> Java-based service, for that matter) to Type=notify instead of Type=forking?
> Examples I see online use forking but I'm not sure that that's the right way
> to go.
For “notify”, application has to have explicit support for systemd. It has to
send READY=1 notification using socket. Usually, when application authors implement
type=notify support, they ship example unit, so you don't have to guess.
Implementing Type=notify is very simple, see https://github.com/faljse/SDNotify
You can ask Tomcat developers to implement it.
Also, if you use wrong type, your application may not fail instantly. Sometimes
minute and a half passes before it fails. See
https://enotty.pipebreaker.pl/2014/10/08/failure-modes-of-incorrect-type-in-systemd-units/
--
Tomasz Torcz 72->| 80->|
xmpp: zdzichubg at chrome.pl 72->| 80->|
More information about the systemd-devel
mailing list