Hortonworks HDP 2.3 Sandbox 中的 Kafka 控制台生产者错误 [英] Kafka console producer Error in Hortonworks HDP 2.3 Sandbox

查看:28
本文介绍了Hortonworks HDP 2.3 Sandbox 中的 Kafka 控制台生产者错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找遍了都没有找到错误.我已经检查了

启动服务器的命令是

 bin/zookeeper-server-start.sh config/zookeeper.properties

  1. 然后我使用 Putty SSH 到 VM 并使用

    启动 kafka 服务器

    $ bin/kafka-server-start.sh config/server.properties

  2. 然后我创建了 Kafka Topic,当我列出该主题时,它就会出现.

  3. 然后我打开另一个 putty 并启动 kafka-console-producer.sh 并输入任何消息(甚至输入)并得到这个长重复的异常.

zookeeper.properties、server.properties、kafka-producer.properties的配置文件如下(分别)

我运行的 Kafka 版本是 8.2.2.我在 kafka/libs 文件夹中看到的东西.P.S. 我在消费者中没有收到任何消息.

任何机构都可以找出问题所在吗?我遵循的教程是 [This][9]

8http://%60http://www.bogotobogo.com/Hadoop/BigData_hadoop_Zookeeper_Kafka_single_node_single_single_node_single>

解决方案

在hortonworks沙箱上看看服务器配置:

$ less/etc/kafka/conf/server.properties

就我而言,它说

<预><代码>...听众=PLAINTEXT://sandbox.hortonworks.com:6667...

这意味着你必须使用下面的命令才能成功连接到console-producer

$ cd/usr/hdp/current/kafka-broker$ bin/kafka-console-producer.sh --topic test --broker-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

  1. I have started a zookeeper server

Command to start server was

 bin/zookeeper-server-start.sh config/zookeeper.properties

  1. Then I SSH into VM by using Putty and started kafka server using

    $ bin/kafka-server-start.sh config/server.properties

  2. Then I created Kafka Topic and when I list the topic, it appears.

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

To consume the messages use

$ bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

这篇关于Hortonworks HDP 2.3 Sandbox 中的 Kafka 控制台生产者错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆