Just a side note; if anyone just puts listeners to <strong style=”box-sizing: border-box; font-family: ‘Helvetica Neue’, Helvetica, Arial, ‘Open Sans’, ‘Lucida Grande’, sans-serif; font-size: 14.3999996185303px; line-height: 21.5999984741211px; background-color: #fbfbfb;”>PLAINTEXT://0.0.0.0:9995 with multiple brokers from Ambari – you will mess things up. Eeach Broker will announce to ZooKeeper that it has host=0.0.0.0. This is not good;
[zk: localhost:2181(CONNECTED) 63] get /brokers/ids/0
{“jmx_port”:-1,”timestamp”:”1441216028421″,”endpoints”:[“PLAINTEXT://0.0.0.0:9995″],“host”:”0.0.0.0″,”version”:2,”port”:9995}
[zk: localhost:2181(CONNECTED) 64] get /brokers/ids/1
{“jmx_port”:-1,”timestamp”:”1441216033323″,”endpoints”:[“PLAINTEXT://0.0.0.0:9995″],“host”:”0.0.0.0″,”version”:2,”port”:9995}
<span style=”text-decoration: underline;”>Solution</span>; add advertised.listeners as PLAINTEXT://localhost:9995 aswell as keeping listeners equals PLAINTEXT://0.0.0.0:9995. The code in Ambari will replace localhost:9995 with your Broker’s real hostname and announce that to Zk.
Now you listen for Kafka traffic on all interfaces, and you keep Zk organized with broker_id=<correct host>. (which is what I needed – dual NICs).