IBM Support

Kafka fails to start if SSL is enabled

Technote (troubleshooting)


Problem(Abstract)

Kafka fails to start if SSL is enabled for the Kafka service. In addition, the ACL properties are not written to Kafka's configuration file, server.properties. Those problems only occur when Kafka is not configured to use Kerberos authentication.

Symptom

After enabling SSL and restarting Kafka from Ambari, the Kafka service is shown as stopped. The Kafka log under /var/log/kafka/kafka.out shows the following exception:

[2016-06-27 11:52:39,277] FATAL (kafka.Kafka$)
java.lang.IllegalArgumentException: requirement failed: security.inter.broker.protocol must be a protocol in the configured set of advertised.listeners. The valid options based on currently configured protocols are Set(SSL)
at scala.Predef$.require(Predef.scala:233)
at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:956)
at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:934)
at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:698)
at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:695)
at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28)
at kafka.Kafka$.main(Kafka.scala:58)
at kafka.Kafka.main(Kafka.scala).


Cause

The properties security.inter.broker.protocol, authorizer.class.name, principal.to.local.class, and super.users are not written to server.properties by Ambari if Kerberos is not enabled.


Resolving the problem

On the node where the Ambari server is installed, perform the following steps:

1. Open the file /var/lib/ambari-server/resources/common-services/KAFKA/0.9.0.4.2/package/scripts/kafka.py.

2. Delete the following eight lines and save the file:
if 'security.inter.broker.protocol' in kafka_server_config:
del kafka_server_config['security.inter.broker.protocol']
if 'authorizer.class.name' in kafka_server_config:
del kafka_server_config['authorizer.class.name']
if 'principal.to.local.class' in kafka_server_config:
del kafka_server_config['principal.to.local.class']
if 'super.users' in kafka_server_config:
del kafka_server_config['super.users']


3. Restart the Ambari server by running "ambari-server restart"

4. From the Ambari UI, start the Kafka service.

Document information

More support for: IBM BigInsights
Open Source Tools

Software version: 4.2.0

Operating system(s): Linux

Reference #: 1986712

Modified date: 11 July 2016