Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to set advertised-hostname for broker to the machine IP address #247

Open
ethanocentricity opened this issue Aug 25, 2016 · 0 comments

Comments

@ethanocentricity
Copy link

Producers to our kafka brokers are failing to connect because they are receiving the internal mesos hostnames during the kafka negotiation, which are not publicly addressable from outside of our bare metal mesos cluster.

This seems to be a result of the patch from #22 (which seems to be related to internal communication between brokers on VMs).

We've implemented a simple fix by modifying Scheduler.scala with the following line after the host.name is set:
advertised.host.name" -> java.net.InetAddress.getByName(offer.getHostname).getHostAddress

This seems to better match the default behavior that Kafka would use if the host.name were not set to the mesos offer host name (see http://kafka.apache.org/090/documentation.html#brokerconfigs).

Manually setting the advertised-hostname is a bad option, since brokers may automatically move around the cluster after the stickiness-period.

If there are cases where using this setting is not desirable (maybe that VM use case in #22 ?), it seems to me like the framework should provide a configuration option to determine what type of advertised hostname is needed.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants