chrismattmann / tika-python

Tika-Python is a Python binding to the Apache Tika™ REST services allowing Tika to be called natively in the Python community.
Apache License 2.0
1.49k stars 234 forks source link

RuntimeError: Unable to start Tika server. #238

Closed erfannariman closed 4 years ago

erfannariman commented 5 years ago

I get the following error:

2019-07-31 00:54:21,492 [MainThread  ] [INFO ]  Retrieving http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.19/tika-server-1.19.jar to /var/folders/l0/v73fdsmn7zq8kdq1xp7wbppw0000gn/T/tika-server.jar.
2019-07-31 00:55:14,176 [MainThread  ] [INFO ]  Retrieving http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.19/tika-server-1.19.jar.md5 to /var/folders/l0/v73fdsmn7zq8kdq1xp7wbppw0000gn/T/tika-server.jar.md5.
2019-07-31 00:55:14,633 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:19,638 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:24,641 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:29,642 [MainThread  ] [ERROR]  Tika startup log message not received after 3 tries.
2019-07-31 00:55:29,644 [MainThread  ] [ERROR]  Failed to receive startup confirmation from startServer.

Not sure what causes this. I checked and I have Java 8 update 221 on Mac OS X El Capitan v10.11.06 installed. Does anyone know how I can solve this problem?

sharebear1993 commented 5 years ago

I also have a similar issue. My error keeps telling me that I am unable to start Tika server. I am using Java jdk 8.0221. I have also set my JAVA_HOME and path to point to java. Further, when I check java version it corresponds to the 8.0221

2019-09-02 19:58:37,700 [MainThread ] [ERROR] Unable to run java; is it installed? 2019-09-02 19:58:37,700 [MainThread ] [ERROR] Failed to receive startup confirmation from startServer.

Harshitg10 commented 5 years ago

I get the following error:

2019-07-31 00:54:21,492 [MainThread  ] [INFO ]  Retrieving http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.19/tika-server-1.19.jar to /var/folders/l0/v73fdsmn7zq8kdq1xp7wbppw0000gn/T/tika-server.jar.
2019-07-31 00:55:14,176 [MainThread  ] [INFO ]  Retrieving http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.19/tika-server-1.19.jar.md5 to /var/folders/l0/v73fdsmn7zq8kdq1xp7wbppw0000gn/T/tika-server.jar.md5.
2019-07-31 00:55:14,633 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:19,638 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:24,641 [MainThread  ] [WARNI]  Failed to see startup log message; retrying...
2019-07-31 00:55:29,642 [MainThread  ] [ERROR]  Tika startup log message not received after 3 tries.
2019-07-31 00:55:29,644 [MainThread  ] [ERROR]  Failed to receive startup confirmation from startServer.

Not sure what causes this. I checked and I have Java 8 update 221 on Mac OS X El Capitan v10.11.06 installed. Does anyone know how I can solve this problem?

P.S. make sure you set env variable before you import tika package

james-see commented 5 years ago

To get this working in a disconnected environment, I had to download a tika server file and set the TIKA_SERVER_JAR to TIKA_SERVER_JAR="file:///home/user/tika-server.jar" which successfully tricked python-tika to "download" this file and move it to /tmp/tika-server.jar and run as background process. This was the only way I could get this to work without the internet. @ErfPy hope this helps.

chrismattmann commented 4 years ago

thanks @jamesacampbell that's a feature, not a bug. Great job!

james-see commented 4 years ago

Lol, no problem. Maybe update the documentation to include this usage scenario if needed by others?

chrismattmann commented 4 years ago

@jamesacampbell can you provide a PR that updates the doco? Would love to update it please let me know.

james-see commented 4 years ago

@chrismattmann sure ill take a look this weekend

james-see commented 4 years ago

@chrismattmann pull request in, cheers.