Avro
  1. Avro
  2. AVRO-701

ipc.HttpServer doesn't let you specify which IP to listen on, just the port

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.5.0
    • Component/s: java
    • Labels:
      None

      Description

      When running on a machine with multiple interfaces, I like to be able to only have things listen on the correct interface (internal, external, localhost).

      The ipc.HttpServer only accepts a port number though ...

      1. truststore
        0.6 kB
        Bruce Mitchener
      2. keystore
        1 kB
        Bruce Mitchener
      3. avro_bindaddress.diff
        2 kB
        Bruce Mitchener
      4. 0001-AVRO-701-AVRO-772-Extensions-to-HttpServer-to-let-yo.patch
        9 kB
        Bruce Mitchener

        Activity

        Hide
        Bruce Mitchener added a comment -

        For whatever it is worth, this used to be something that the ops team at a previous job required, otherwise they got all whine-y.

        Show
        Bruce Mitchener added a comment - For whatever it is worth, this used to be something that the ops team at a previous job required, otherwise they got all whine-y.
        Hide
        Bruce Mitchener added a comment -

        Unfortunately, it looks like this might require an upgrade to Jetty 7 to use the new Server constructor that takes an InetSocketAddress.

        Show
        Bruce Mitchener added a comment - Unfortunately, it looks like this might require an upgrade to Jetty 7 to use the new Server constructor that takes an InetSocketAddress.
        Hide
        Philip Zeyliger added a comment -

        I think this is a good idea (finding a way to specify the IP). I haven't had a chance to confirm that this requires an upgrade to Jetty; I think older versions of Jetty have this feature (since Hadoop has had it for ages).

        Show
        Philip Zeyliger added a comment - I think this is a good idea (finding a way to specify the IP). I haven't had a chance to confirm that this requires an upgrade to Jetty; I think older versions of Jetty have this feature (since Hadoop has had it for ages).
        Hide
        Bruce Mitchener added a comment -

        Just in case the other Hadoop things do it via configuration rather than programmatically, I hope this can be done via code as I ran into this issue with Flume and plan to file a bug on Flume to allow its RPC to configured to listen on a particular interface.

        Show
        Bruce Mitchener added a comment - Just in case the other Hadoop things do it via configuration rather than programmatically, I hope this can be done via code as I ran into this issue with Flume and plan to file a bug on Flume to allow its RPC to configured to listen on a particular interface.
        Hide
        Bruce Mitchener added a comment -

        Found it ... you just have to create the SelectChannelConnector manually .. Hadoop's HttpServer (org.apache.hadoop.http.HttpServer) does this.

        Show
        Bruce Mitchener added a comment - Found it ... you just have to create the SelectChannelConnector manually .. Hadoop's HttpServer (org.apache.hadoop.http.HttpServer) does this.
        Hide
        Bruce Mitchener added a comment -

        This passes the current tests.

        Show
        Bruce Mitchener added a comment - This passes the current tests.
        Hide
        Bruce Mitchener added a comment -

        Would like this to be in 1.5 as we need it in Cloudera Flume.

        Show
        Bruce Mitchener added a comment - Would like this to be in 1.5 as we need it in Cloudera Flume.
        Hide
        Holger Hoffstätte added a comment -

        +1 Excellent suggestion!

        Show
        Holger Hoffstätte added a comment - +1 Excellent suggestion!
        Hide
        Doug Cutting added a comment -

        Looks good to me, but should probably have a test.

        I don't see this as a blocker, since it's a compatible API change and doesn't fix a regression. That said, I expect we'll be able to get this into 1.5.0.

        Show
        Doug Cutting added a comment - Looks good to me, but should probably have a test. I don't see this as a blocker, since it's a compatible API change and doesn't fix a regression. That said, I expect we'll be able to get this into 1.5.0.
        Hide
        Bruce Mitchener added a comment -

        See discussion on AVRO-772. I'll submit a modified form of this patch again after I take a nap.

        Show
        Bruce Mitchener added a comment - See discussion on AVRO-772 . I'll submit a modified form of this patch again after I take a nap.
        Hide
        Bruce Mitchener added a comment -

        I had a lot (many hours) of trouble getting AVRO-772 working due to the test and issues with certificates and such. I've got a single combined patch for this + AVRO-772. Will post it in a moment.

        Show
        Bruce Mitchener added a comment - I had a lot (many hours) of trouble getting AVRO-772 working due to the test and issues with certificates and such. I've got a single combined patch for this + AVRO-772 . Will post it in a moment.
        Hide
        Bruce Mitchener added a comment -

        Would like to get this into 1.5.0 ...

        Show
        Bruce Mitchener added a comment - Would like to get this into 1.5.0 ...
        Hide
        Bruce Mitchener added a comment -

        These are the binary files in the other patch.

        Show
        Bruce Mitchener added a comment - These are the binary files in the other patch.
        Hide
        Doug Cutting added a comment -

        +1 This looks good to me and tests pass. Thanks, Bruce!

        Show
        Doug Cutting added a comment - +1 This looks good to me and tests pass. Thanks, Bruce!

          People

          • Assignee:
            Bruce Mitchener
            Reporter:
            Bruce Mitchener
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development