[
https://issues.apache.org/jira/browse/JENA-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409935#comment-16409935
]
Joachim Neubert commented on JENA-1511:
---------------------------------------
Interesting that this is different on Ubuntu and Redhat/CentOS (7.4, for the
record). Can you make Fusekis exit code visible?
The {{/bin/kill}} was intended to make the default behaviour more obvious.
However, that misses the fact that the default behaviour sends an additional
SIGKILL after a timeout:
{quote}Since no {{ExecStop=}} was specified, systemd will send SIGTERM to all
processes started from this service, and after a timeout also SIGKILL. This
behavior can be modified, see
[systemd.kill(5)|https://www.freedesktop.org/software/systemd/man/systemd.kill.html]
for details.
{quote}
Therefore, for now it makes probably more sense to drop the {{ExecStop=}}
completely.
The
[docs|https://www.freedesktop.org/software/systemd/man/systemd.service.html]
suggest to implement something more sophisticated to make sure that the service
closes cleanly. But this requires knowledge of the inner working of
fuseki-server and particularly its exit codes which I don't have.
> Stopping systemd service for Fuseki
> -----------------------------------
>
> Key: JENA-1511
> URL: https://issues.apache.org/jira/browse/JENA-1511
> Project: Apache Jena
> Issue Type: Improvement
> Components: Fuseki
> Reporter: Joachim Neubert
> Priority: Minor
>
> Currently, the systemd service creates errors on exit:
> {code:java}
> Mar 22 16:08:32 ite-srv26 systemd[1]: Stopping Fuseki...
> Mar 22 16:08:33 ite-srv26 systemd[1]: fuseki.service: main process exited,
> code=exited, status=143/n/a
> Mar 22 16:08:33 ite-srv26 systemd[1]: Stopped Fuseki.
> Mar 22 16:08:33 ite-srv26 systemd[1]: Unit fuseki.service entered failed
> state.
> Mar 22 16:08:33 ite-srv26 systemd[1]: fuseki.service failed.
> {code}
> I found that adding the lines
> {code:java}
> ExecStop=/bin/kill $MAINPID
> SuccessExitStatus=143
> {code}
> to the unit file reduces that to
> {code:java}
> Mar 22 16:11:23 ite-srv26 systemd[1]: Stopping Fuseki...
> Mar 22 16:11:23 ite-srv26 systemd[1]: Stopped Fuseki.
> {code}
> I'm not sure however that sending SIGTERM is the correct/best way to stop the
> service, and if the exit code 143 wants to tell us something.
> Ping [~osma] for this one, too.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)