Hey,

Trying to install the Tika server on 22.04 LTS and so far it's not entirely successful. Tried 2.9.2 first and that failed, searched and found only a very short discussion with someone else having the same issue and being asked what version the issue started with. So I tried 2.4.1, from the archives, same problem.

The install proceeds as follows:

--------------------CUT--------------------

$ curl https://archive.apache.org/dist/tika/2.4.1/tika-server-standard-2.4.1-bin.zip --output tika-server-standard-2.4.1-bin.zip
....
$ unzip -p tika-server-standard-2.4.1-bin.zip tika-server-standard-2.4.1-bin/bin/install_tika_service.sh > install_tika_service.sh $ sudo bash ./install_tika_service.sh ./tika-server-standard-2.4.1-bin.zip
id: ‘tika’: no such user
Creating new user: tika
Adding system user `tika' (UID 117) ...
Adding new group `tika' (GID 123) ...
Adding new user `tika' (UID 117) with group `tika' ...
Creating home directory `/var/tika' ...
Tika extract dir: /opt
TIKA_DIR: tika-server-standard-2.4.1-bin
tika install dir: /opt/tika-server-standard-2.4.1-bin
Extracting ./tika-server-standard-2.4.1-bin.zip to /opt
Installing symlink /opt/tika -> /opt/tika-server-standard-2.4.1-bin ...
Installing /etc/init.d/tika script ...
Installing /etc/default/tika.in.sh ...
chmod: missing operand after ‘0640’
Try 'chmod --help' for more information.
Service tika installed.
Customize Tika startup configuration in /etc/default/tika.in.sh
Job for tika.service failed because the control process exited with error code. See "systemctl status tika.service" and "journalctl -xeu tika.service" for details.
× tika.service - LSB: Controls Apache Tika as a Service
     Loaded: loaded (/etc/init.d/tika; generated)
Active: failed (Result: exit-code) since Mon 2024-06-10 17:13:16 UTC; 5s ago
       Docs: man:systemd-sysv-generator(8)
Process: 2435 ExecStart=/etc/init.d/tika start (code=exited, status=1/FAILURE)
        CPU: 11ms
Jun 10 17:13:12 paperless systemd[1]: Starting LSB: Controls Apache Tika as a Service...
Jun 10 17:13:12 paperless su[2437]: (to tika) root on none
Jun 10 17:13:12 paperless su[2437]: pam_unix(su-l:session): session opened for user tika(uid=117) by (uid=0) Jun 10 17:13:16 paperless systemd[1]: tika.service: Control process exited, code=exited, status=1/FAILURE Jun 10 17:13:16 paperless systemd[1]: tika.service: Failed with result 'exit-code'. Jun 10 17:13:16 paperless systemd[1]: Failed to start LSB: Controls Apache Tika as a Service.

--------------------CUT--------------------

You can see an error in the script referring to chmod 0640. The only command in the script that does this references TIKA_VAR_DIR which defaults to /var/$TIKA_SERVICE, which does exist after the install "fails", but with perms 0650 rather than 0640 indicating the variable isn't set or being interpolated correctly at that point in the script.

Note that after this "failed" install, there are two java processes running as the tika user that was created, according to "ps auxwww | grep [t]ika" but the service still indicates failed according to systemd and thus cannot be controlled (stopped/started/restarted).


Reply via email to