Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Configure Kafka port per hostname in Cloudera

New Contributor


We need advise about advanced Kafka configuration in Cloudera


We are using cloudera env installed on 6 servers per following distribution:



Application node


kafka service is installed on data nodes 1-3 and we would like to know:

How can we configure Kafka port per hostname and not per service?
we would like to have following outcome for example:
datanode1 - remain with kafka default port 9092
datanode2 - will be configured with new port #
datanode3 - will be configured with new port #






Super Guru

That's an odd thing to do 🙂 If you need to use another port for some reason, it would be better to change the ports on all hosts consistently, using the "TCP Port" or the "TLS/SSL Port" properties in Cloudera Manager, whether are you connecting without TLS or with it, respectively.


It is possible to configure ports on a host-by-host basis, but it makes it harder to maintain and client configuration becomes a little more cumbersome. To change the port for a particular host, go to Kafka > Instances > Click on the broker your want the change the port for > Configuration > Continue Editing Role Instance.


Then enter the following in the "Kafka Broker Advanced Configuration Snippet (Safety Valve) for" property:



The PLAINTEXT value will depend on your cluster config:

  • PLAINTEXT: No Kerberos, No TLS
  • SSL: No Kerberos, Using TLS
  • SASL_PLAINTEXT: Using Kerberos, No TLS
  • SASL_SSL: Using Kerberos, Using TLS

After that restart the Broker instance that was reconfigured.

Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.