No real explanation of this problem, but indeed the service is not really
installed.


*$ service --status-all | grep tika$*

If it helps you, I did the same installation as you with 2.9.2 and you can
still use the service the old way with the *init.d* commands.


*$ ps -edf | grep java$*






*$ sudo /etc/init.d/tika startDefault server /opt/tika/Waiting up to 180
seconds to see Tika running on port 9998 [|]Started Tika server on port
9998 (pid=3290232839). Happy extracting!**$ ps -edf | grep java*



*tika       32839       1 41 07:32 ?        00:00:07 java -server
-XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled
-XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -jar
tika-server.jar -p 9998 -h 0.0.0.0tika       32902   32839 99 07:32 ?
 00:00:14 java -Djava.awt.headless=true -cp tika-server.jar
-Dtika.server.id
<http://Dtika.server.id>=084fc110-7daa-4063-83ec-125ccf116234
org.apache.tika.server.core.TikaServerProcess -h 0.0.0.0 -p 9998 -i
084fc110-7daa-4063-83ec-125ccf116234 -forkedStatusFile
/tmp/apache-tika-server-forked-tmp-16234267298812904113 -numRestarts 0*




*$ sudo /etc/init.d/tika stopDefault server /opt/tika/Sending terminate
command to Tika running on port 9998 with process 32839$ ps -edf | grep
java$*

@*JB*Δ <http://data31tech.com>



Le lun. 10 juin 2024 à 19:42, Nunya Business <[email protected]> a écrit :

> 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