Support Questions

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

issue in Kafka topic creation

avatar
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

avatar
Master 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

.

View solution in original post

8 REPLIES 8

avatar
Master 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

.

avatar
Contributor

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

avatar
Master 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...

avatar
Master 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.

avatar
Contributor

@Jay SenSharma : Sure i will do that.

Hhaving another issue while executing kafka consumer

kafka-consumer-issue.png

avatar
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"

avatar
Rising Star

@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.

avatar
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.