You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Craig Steforn Matadeen <cr...@gmail.com> on 2022/01/05 11:17:24 UTC

Running Tika Server as Unix Service

Hi all, I hope that this is the right place to ask such questions. I
recently tried installing Tika using the instructions listed at
https://cwiki.apache.org/confluence/display/TIKA/TikaServer#TikaServer-InstallationofTikaServer

After finishing the installation, I realised that the service always starts
correctly but exits with an error code. Even with the error code, the
service continues to run but systemctl start/stop tika will always show an
error message.

Looking at the /opt/tika/bin/tika executable, I noticed the following lines
(564-567):

if [[ "$SCRIPT_CMD" == "start" ]]; then
  start_tika "$FG" "$ADDITIONAL_CMD_OPTS"
  exit 1
fi

I wouldn't consider myself a unix scripting expert, but based on line 566,
it seems that no matter the return value of the start_tika function,
starting the service would always return a non-zero (error) exit code.

Is this how it's supposed to work?

Cordiali Saluti,

Craig S. Matadeen