Kafka控制台生产者Hortonworks HDP 2.3沙箱中的错误 [英] Kafka console producer Error in Hortonworks HDP 2.3 Sandbox
问题描述
我已经搜遍了,找不到错误。
我已经检查过
启动服务器的命令为
bin / zookeeper-server-start.sh config / zookeeper.properties
$ p $然后我通过使用Putty SSH进入虚拟机,并使用
$启动kafka服务器
- b $ b
$ bin / kafka-server-start.sh config / server.properties
然后我创建了Kafka Topic,当我列表这个话题,就会出现。
zookeeper.properties,server.properties和kafka-producer.properties的配置文件如下(分别)
p>
我运行的Kafka版本是8.2.2。就像我在kafka / libs文件夹中看到的那样。
P。我在消费者中没有收到任何消息。
任何人都可以找出问题所在吗?
我接下来的教程是[This] [9]
8 http ://%60http://www.bogotobogo.com/Hadoop/BigData_hadoop_Zookeeper_Kafka_single_node_single_broker_cluster.php%60
解决方案在hortonworks沙箱中可以看到服务器配置:
$ less /etc/kafka/conf/server.properties
在我的情况中,它表示
...
听众= PLAINTEXT://sandbox.hortonworks.com:6667
...
这意味着您必须使用以下命令成功连接到控制台生产者
$ cd / usr / hdp / current / kafka-broker
$ bin / kafka-console-producer.sh - 主题测试--bro ker-list sandbox.hortonworks.com:6667
如果您使用
- broker-list 127.0.0.1:6667
或- broker-list localhost:6667
。另请参阅 http://docs.hortonworks.com /HDPDocuments/HDP2/HDP-2.3.0/bk_installing_manually_book/content/configure_kafka.html
要使用消息,请使用
$ bin / kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
I have searched it all over and couldn't find the error. I have checked This Stackoverflow Issue but it is not the problem with me
I have started a zookeeper server
Command to start server was
bin/zookeeper-server-start.sh config/zookeeper.properties
Then I SSH into VM by using Putty and started kafka server using
$ bin/kafka-server-start.sh config/server.properties
Then I created Kafka Topic and when I list the topic, it appears.
- Then I opened another putty and started kafka-console-producer.sh and typed any message (even enter) and get this long repetitive exception.
Configuration files for zookeeper.properties, server.properties, kafka-producer.properties are as following (respectively)
The version of Kafka i am running is 8.2.2. something as I saw it in kafka/libs folder. P.S. I get no messages in consumer.
Can any body figure out the problem? The tutorial I was following was [This][9]
8http://%60http://www.bogotobogo.com/Hadoop/BigData_hadoop_Zookeeper_Kafka_single_node_single_broker_cluster.php%60
解决方案On the hortonworks sandbox have a look at the server configuration:
$ less /etc/kafka/conf/server.properties
In my case it said
... listeners=PLAINTEXT://sandbox.hortonworks.com:6667 ...
This means you have to use the following command to successfully connect with the console-producer
$ cd /usr/hdp/current/kafka-broker $ bin/kafka-console-producer.sh --topic test --broker-list sandbox.hortonworks.com:6667
It won't work, if you use
--broker-list 127.0.0.1:6667
or--broker-list localhost:6667
. See also http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_installing_manually_book/content/configure_kafka.htmlTo consume the messages use
$ bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
这篇关于Kafka控制台生产者Hortonworks HDP 2.3沙箱中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!