Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

issue in Kafka topic creation

Solved Go to solution

issue in Kafka topic creation

New Contributor

kafka-issue.pngGetting issue in kafka topic creation command

"bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic test --replication-factor 1 --partitions 1"

PFA screen shot for reference

1 ACCEPTED SOLUTION

Accepted Solutions

Re: issue in Kafka topic creation

Super Mentor

@Sanjib Behera

From your screenshot it looks like you are using kafka in a kerberozed environment so can you please check if youa re able to get a valid kerberos ticket?

# kinit -kt /etc/security/keytabs/kafka.service.keytab  kafka/something@EXAMPLE.COM
# klist

Also please try running the producer again after setting the following properties?

# export 
KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_client_jaas.conf"

.

Additionally check if the following is set properly ? https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_storm-user-guide/content/stormkafka-secu...

spoutConfig.securityProtocol=PLAINTEXTSASL

.

8 REPLIES 8

Re: issue in Kafka topic creation

Super Mentor

@Sanjib Behera

From your screenshot it looks like you are using kafka in a kerberozed environment so can you please check if youa re able to get a valid kerberos ticket?

# kinit -kt /etc/security/keytabs/kafka.service.keytab  kafka/something@EXAMPLE.COM
# klist

Also please try running the producer again after setting the following properties?

# export 
KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_client_jaas.conf"

.

Additionally check if the following is set properly ? https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_storm-user-guide/content/stormkafka-secu...

spoutConfig.securityProtocol=PLAINTEXTSASL

.

Re: issue in Kafka topic creation

New Contributor

Thanks for the quick solution... it worked for me, but did not try the Strom kafka spout configuration.

Re: issue in Kafka topic creation

Super Mentor

@Sanjib Behera

Good to know that previously mentioned suggestion worked.

Regarding the "spoutConfig.securityProtoco" config you can refer to the following link to know more about it. Sometimes an incorrect value to this property causes issue, but in your case looks like it is alredy running fine.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_storm-user-guide/content/stormkafka-secu...

Re: issue in Kafka topic creation

Super Mentor

@Sanjib Behera

It will be good if you can mark this HCC thread as Answerd by clicking on the "Accept" button on the correct answer that helps others.

Re: issue in Kafka topic creation

New Contributor

@Jay SenSharma : Sure i will do that.

Hhaving another issue while executing kafka consumer

kafka-consumer-issue.png

Re: issue in Kafka topic creation

New Contributor

Currently i am getting "No brokers found in ZK." issue for the following command

"kafka-console-consumer.sh --zookeeper abc00691239901.cde.com:6667 --topic test --from-beginning"

Highlighted

Re: issue in Kafka topic creation

Contributor

@Sanjib Behera Is this the same issue as provided in screenshot ? If yes, Could you please check "listeners" section in server.properties. As you are not using kerberos while consuming value of "listeners" should contain PLAINTEXT.

If this is a different error then please provide complete traceback message.

Re: issue in Kafka topic creation

Expert Contributor
@Sanjib Behera

if the cluster is Kerberos enabled then we need "kafka-console-consumer.sh --zookeeper abc00691239901.cde.com:6667 --topic test --from-beginning --security-protocol PLAINTEXTSASL" and for Storm spout you need to have jaas file to be configured.

Don't have an account?
Coming from Hortonworks? Activate your account here