[ 
https://issues.apache.org/jira/browse/TIKA-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14701493#comment-14701493
 ] 

Chris A. Mattmann commented on TIKA-1714:
-----------------------------------------

Yeah tricky. I'm not sure if it should be localhost by default. Here's a real 
use case:

http://github.com/chrismattmann/tika-python/

One of the things it does first is to check whether or not Tika server exists, 
is running on a port, and if not, it downloads it to run in the background. The 
command it uses to download and run tika is the default java -jar 
/path/to/tika/server.jar. By default, this works fine on Linux/localhost, since 
I believe localhost there allows outside connections. By default though this 
breaks on Windows from the perspective of letting folks access Tika-server from 
the outside world on the windows box it's running on since the bind address is 
not 0.0.0.0 and since localhost/Windows apparently only binds to 127.0.0.1. 

It's an easy fix in Tika python - I could just detect if Windows, and then run 
a different command. See: 
https://github.com/chrismattmann/tika-python/issues/66

I'm not convinced localhost is the right answer. However, also not convinced 
0.0.0.0 is fully right too for the reasons you mention [~thetaphi]. Let me 
think about this. In the meanwhile I'll take care of #66 in Tika-Python to work 
around it for now.


> Consider making default host for Tika Server 0.0.0.0 instead of localhost
> -------------------------------------------------------------------------
>
>                 Key: TIKA-1714
>                 URL: https://issues.apache.org/jira/browse/TIKA-1714
>             Project: Tika
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 1.10
>            Reporter: Chris A. Mattmann
>            Assignee: Chris A. Mattmann
>             Fix For: 1.11
>
>
> I noticed in Tika-Python on Windows while fixing some bugs that by default 
> Tika Server binds to localhost which means that the Tika Server running on 
> Windows isn't available to external hosts trying to access it on <host 
> name>:9998. I think the default behavior is that it *should* be available 
> externally, meaning, we should probably bind to the special address, 0.0.0,0 
> which binds to all interfaces. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to