[ https://issues.apache.org/jira/browse/KAFKA-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534442#comment-13534442 ]
Matan edited comment on KAFKA-675 at 12/18/12 12:00 AM: -------------------------------------------------------- Nope actually, in this setup, the default would bind to the interface returned by InetAddress.getLocalHost.getHostAddress. There wouldn't be a way to bind to all. I guess that would require some more surgery to get that considering that is the default in 0.8's KafkaConfig 'hostname'. This used to be null in 0.7.2. Maybe the disconnect is that 'hostname' is used to define what is published in ZK which is always required - whereas you'd want to define the bind interface as well. Ideally it would do both in one shot which is what i did. Unfortunately, that doesn't leave room for 0.0.0.0. was (Author: matan_a): Nope actually, in this setup, the default would bind to the interface returned by InetAddress.getLocalHost.getHostAddress. There wouldn't be a way to bind to all. I guess that would require some more surgery to get that considering that in 0.8 'hostname' in KafkaConfig defaults to: InetAddress.getLocalHost.getHostAddress. (This used to be null in 0.7.2) > Only bind to the interface declared in the 'hostname' config property > --------------------------------------------------------------------- > > Key: KAFKA-675 > URL: https://issues.apache.org/jira/browse/KAFKA-675 > Project: Kafka > Issue Type: Improvement > Components: config, core > Affects Versions: 0.8 > Reporter: Matan > Priority: Minor > Attachments: kafka-675.patch > > > At the moment, Kafka always binds to all interfaces (0.0.0.0) which isn't > ideal on some environments, even if the 'hostname' config parameter is set. > Kafka should only bind to the interface set in the 'hostname' parameter - > which defaults to InetAddress.getLocalHost.getHostAddress -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira