Stopping a Tika server properly
Asked Answered
M

2

10

In order to start a Tika server that can be accessed from hosts other that localhost we know that the way to go is (say I have version 1.7 and want to run on port 9998)

java -jar tika-server-1.7-SNAPSHOT.jar -host 0.0.0.0

My question is: Is there a proper way to properly stop this server with a command or is killing the process the only way?

Metabolic answered 2/9, 2014 at 21:59 Comment(5)
SIGTERM would be my first guess. Since this basically asks the process nicely to shut down if it wants to, I would consider that safe.Plumbiferous
What's wrong with hitting control+c on the window where it's running?Richthofen
@Gagravarr: Assume that you do not have access to that window (e.g. it is closed by another process / user).Metabolic
Where do you try to run tika-server? on windows or linux?Oscillograph
Linux machine ( Ubuntu 12 )Metabolic
I
2

As of October 2019 there is no programmatic way to shut it down. Documentation notes:

In the future, we may implement a gentler shutdown than we currently have.

Intersect answered 3/10, 2019 at 17:57 Comment(0)
F
0

Apache tika 2.4.1 added stop() method to TikaServerCli so that it can be run with Apache Commons Daemon.

https://issues.apache.org/jira/browse/TIKA-1570

https://downloads.apache.org/tika/2.4.1/CHANGES-2.4.1.txt

Forgiving answered 4/7, 2022 at 4:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.