You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Yarek Tyshchenko (JIRA)" <ji...@apache.org> on 2016/10/05 10:35:21 UTC

[jira] [Created] (KAFKA-4256) Use IP for ZK broker register

Yarek Tyshchenko created KAFKA-4256:
---------------------------------------

             Summary: Use IP for ZK broker register
                 Key: KAFKA-4256
                 URL: https://issues.apache.org/jira/browse/KAFKA-4256
             Project: Kafka
          Issue Type: Improvement
          Components: core
            Reporter: Yarek Tyshchenko
            Priority: Minor


Kafka seems to default to using fqdn when registering itself with Zookeeper, using the call "java.net.InetAddress.getCanonicalHostName()". This means that in an environment where host's hostname doesn't resolve for zookeeper node will make that node unreachable.
Currently theres no way to tell kafka to just use the IP address, I understand that it would be difficult to know which interface it should use to get the IP from.

One environment like this is docker (prior to version 1.11, where networks are available). Only solution right now is to hard-code the IP address in the configuration file.

It would be nice if there was a configuration option to just use the IP address of a specified interface.

For reference I'm including my workaround for research:
https://github.com/YarekTyshchenko/kafka-docker/blob/0d79fa4f1d5089de5ff2b6793f57103d9573fe3b/ip.sh



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