Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NOTE 3: When using the -spawnChild option, clients will need to be aware that the server could be unavailable temporarily while it is restarting.  Clients will need to have a retry logic.

Logging

You In Tika 1.x, you can customize logging via the usual log4j commandline argument, e.g. -Dlog4j.configuration=file:log4j_server.xml. If using -spawnChild, specify the configuration for the child process with the -J prepended as in java -jar tika-server-X.Y-jar -spawnChild -JDlog4j.configuration=file:log4j_server.xml. Some important notes for logging in the child process in versions <= 1.19.1: 1) make sure that the debug option is off, and 2) do not log to stdout (this is used for interprocess communication between the parent and child!).

The default level of logging is debug, but you can also set logging to info via the commandline: -log info.

In Tika 2.x, you can set log4j2.xml configuration for the forked process in the <jvmArgs/> element.  See below.

Monitoring

ServerStatus

Tika Server uses ServerStatus object to maintain and track current status of server. The data can be exported to REST resource and JMX MBean (from 1.26).

...

No Format
<properties>
  <server>
    <params>
      <port>9999</port>
      <forkedJvmArgs>
        <arg>-Xmx2g</arg>
        <arg>-Dlog4j.configurationFile=my-forked-log4j2.xml</arg>
      </forkedJvmArgs>
      <endpoints>
        <endpoint>status</endpoint>
        <endpoint>rmeta</endpoint>
      </endpoints>
    </params>
  </server>
</properties>

...