Tika
  1. Tika
  2. TIKA-1196

JAX-RS server only responds to queries to/from http://localhost

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: server
    • Environment:

      Mac OS X, Windows Server 2008

      Description

      I'm not sure if this is a problem with the Tika JAX-RS server, or with how it uses CXF under the hood. Anyway:

      I have a large text extraction job (10-15 million documents) that I'm using the web service for. It would be nice to be able to distribute this horizontally across multiple nodes to speed up the processing. I had thought to have a job queue with a couple consumers, farming out PUT requests across several Tika web service endpoints.

      But the JAX-RS web service will only respond to queries made to http://localhost:9998/tika.

      I can't call http://hostname:9998/tika – even if it's still a local operation.

      Here is a list of things I've tried:

      • I changed line 89 of TikaServerCLI.java to compute the name of the host at runtime. No go: the server starts up, and immediately terminates.
      • I changed line 89 of TikaServerCLI.java to be a hostname (not a FQDN), and re-compiled:
        • mvn compile -rf :tika-server compiles successfully. Start up the server, and it terminates, just like when I tried to compute the hostname at runtime
        • mvn install from the topmost Tika directory gets the service responding to both http://hostname:9998/tika and http://hostname.domain.net:9998/tika (Seemed weird, this is why I was thinking it was further up the chain in CXF?)

      In a perfect world:

      1. The server should respond to any valid calls that make sense:
        • 127.0.0.1
        • localhost
        • hostname
        • host.domain.tld
        • ip_address
      2. A hostname invocation parameter could be used to limit what the service responds to when it's started up. (A very optional, nice-to-have.)
      1. tika-1196c.patch
        2 kB
        Rian Stockbower
      2. tika-1196b.patch
        2 kB
        Rian Stockbower
      3. tika-1196.patch
        0.8 kB
        Rian Stockbower

        Issue Links

          Activity

          Rian Stockbower created issue -
          Rian Stockbower made changes -
          Field Original Value New Value
          Summary JAX-RS server only responds to queries to/from localhost JAX-RS server only responds to queries to/from http://localhost
          Rian Stockbower made changes -
          Description I'm not sure if this is a problem with the Tika JAX-RS server, or with how it uses CXF under the hood. Anyway:

          I have a large text extraction job (10-15 million documents) that I'm using the web service for. It would be nice to be able to distribute this horizontally across multiple nodes to speed up the processing. I had thought to have a job queue with a couple consumers, farming out PUT requests across several Tika web service endpoints.

          But the JAX-RS web service will only respond to queries made to {{http://localhost:9998/tika}}.

          I can't call {{http://hostname:9998/tika}} -- even if it's still a local operation.

          Here is a list of things I've tried:
          * I changed line 89 of TikaServerCLI.java to compute the name of the host at runtime. No go: the server starts up, and immediately terminates.
          * I changed line 89 of TikaServerCLI.java to be a hostname (not a FQDN), and re-compiled:
          ** {{mvn compile -rf :tika-server}} compiles successfully. Start up the server, and it terminates, just like when I tried to compute the hostname at runtime
          ** {{mvn install}} from the topmost Tika directory gets the service responding to both {{http://hostname:9998/tika}} and {{http://hostname.domain.net:9998/tika}} (Seemed weird, this is why I was thinking it was further up the chain in CXF?)

          In a perfect world:
          # The server should respond to any valid calls that make sense:
          #* 127.0.0.1
          #* localhost
          #* hostname
          #* host.domain.tld
          #* ip_address
          # An hostname invocation parameter could be used to limit how what the service responds to when it's started up. (A very optional, nice-to-have.)
          I'm not sure if this is a problem with the Tika JAX-RS server, or with how it uses CXF under the hood. Anyway:

          I have a large text extraction job (10-15 million documents) that I'm using the web service for. It would be nice to be able to distribute this horizontally across multiple nodes to speed up the processing. I had thought to have a job queue with a couple consumers, farming out PUT requests across several Tika web service endpoints.

          But the JAX-RS web service will only respond to queries made to {{http://localhost:9998/tika}}.

          I can't call {{http://hostname:9998/tika}} -- even if it's still a local operation.

          Here is a list of things I've tried:
          * I changed line 89 of TikaServerCLI.java to compute the name of the host at runtime. No go: the server starts up, and immediately terminates.
          * I changed line 89 of TikaServerCLI.java to be a hostname (not a FQDN), and re-compiled:
          ** {{mvn compile -rf :tika-server}} compiles successfully. Start up the server, and it terminates, just like when I tried to compute the hostname at runtime
          ** {{mvn install}} from the topmost Tika directory gets the service responding to both {{http://hostname:9998/tika}} and {{http://hostname.domain.net:9998/tika}} (Seemed weird, this is why I was thinking it was further up the chain in CXF?)

          In a perfect world:
          # The server should respond to any valid calls that make sense:
          #* 127.0.0.1
          #* localhost
          #* hostname
          #* host.domain.tld
          #* ip_address
          # A {{hostname}} invocation parameter could be used to limit what the service responds to when it's started up. (A very optional, nice-to-have.)
          Rian Stockbower made changes -
          Attachment tika-1196.patch [ 12614305 ]
          Rian Stockbower made changes -
          Link This issue relates to TIKA-1197 [ TIKA-1197 ]
          Rian Stockbower made changes -
          Attachment tika-1196b.patch [ 12614306 ]
          Rian Stockbower made changes -
          Attachment tika-1196c.patch [ 12614310 ]
          Sergey Beryozkin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Sergey Beryozkin [ sergey_beryozkin ]
          Fix Version/s 1.5 [ 12324552 ]
          Resolution Fixed [ 1 ]
          Jukka Zitting made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Sergey Beryozkin
              Reporter:
              Rian Stockbower
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development