Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

issue in Kafka topic creation

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

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

.

View solution in original post

8 REPLIES 8

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

.

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

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

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.

@Jay SenSharma : Sure i will do that.

Hhaving another issue while executing kafka consumer

kafka-consumer-issue.png

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"

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.

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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.