kafka 创建消费者报错

kafka-console-consumer.sh --zookeeper master:2181,slave1:2181,slave2:2181 --topic test --from-beginning
# zookeeper is not a recognized option

 在创建消费者的时候出现  zookeeper is not a recognized option,经过在浏览器搜索发现是版本问题,消费者读取信息配置不在是 zookeeper 的节点信息,而直接改成 kafka 本身的信息,将上面的语句改成下面即可。

kafka-console-consumer.sh --zookeeper master:2181,slave1:2181,slave2:2181 --topic test --from-beginning

# 改成下面这样
kafka-console-consumer.sh --bootstrap-server master:9092 --topic baduo --from-beginning 

# --zookeeper master:2181,slave1:2181,slave2:2181
# 变成了
# --bootstrap-server master:9092

  

原文地址:https://www.cnblogs.com/hanwen1014/p/11206359.html

时间: 2024-08-02 08:09:49

kafka 创建消费者报错的相关文章

kafka创建topic报错

kafka执行如下创建topic的语句: [[email protected] kafka_2.11-1.0.0]# bin/kafka-topics.sh --create --topic streaming-test --replication-factor 1 --partitions 3 --zookeeper node01:2181,node02:2181,node03:2181Error while executing topic command : Replication fact

java客户端作为kafka的consumer报错org.I0Itec.zkclient.exception.ZkTimeoutException

出错现象: java客户端编程作为kafka的消费端,连接kafka的broker报错 出错原因分析: 当服务器配置或者网络环境较差时,会出现连接zk超时的情况出现; 解决方法:将程序中的timeout数值调大 props.put("zookeeper.session.timeout.ms", "15000");

quick3.3final版创建项目报错解决

quick3.3final版创建项目报错解决 今天新下载了quick3.3final版,于是安装,创建项目,打开player新建项目如下图 然后点击创建,就发生了如下错误,相信应该有不少朋友会碰到的 首先,这里有两个错误 1.PHP Notice:  Undefined index: extracmd in /Users/wangmeng/Documents/quick-3.3/quick/bin/lib/quick/ProjectCreator.php on line 117 这是117行有未

android studio创建模拟器报错解决 emulator: ERROR: This AVD's configuration is missing a kernel file!!

android studio创建模拟器报错 emulator: ERROR: This AVD's configuration is missing a kernel file!! 的解决办法 原因有二:1 没有,解决办法通过sdk mangager 下载 2 找不到,解决办法看系统环境变量path(此种情况多数发生在android Studio和EclipseADT同时存在的情况下) 原因是在刚刚安装完毕的androidstudio的sdk目录下没有system-image目录,也许有但没有相

SQLSERVER 创建ODBC 报错的解决办法 SQLState:'01000'的解决方案

错误详情如下: SQLState:'01000' SQL Server 错误:14 [Microsoft][ODBC SQL Server Driver][DBNETLIB] ConnectionOpen (Invalid Instance()). 连接失败: SQLState:'08001' SQL Server 错误:14 [Microsoft][ODBC SQL Server Driver][DBNETLIB] 无效的连接. 解决办法: 在创建ODBC数据源的步骤中,点击“客户端配置”,勾

11gR2RAC环境DBCA创建数据库报错ORA-15055 ORA-15001

11gR2RAC环境DBCA创建数据库报错ORA-15055 ORA-15001 问题现象: 在11gR2 GridInfrastructure和Database软件安装完成之后,执行DBCA创建数据库到30%的时候报如下错误,点击OK后提示忽略并停止安装. 问题分析:      从上面的问题我们不难看出是因为无法访问ASM磁盘组导致,但是要解决该问题就得进入到ASM中去探个究竟,为什么刚装好的集群,建库就出现问题. 随即我们先通过grid用户登录到asm实例执行如下查询操作,我们发现磁盘组均为

mysql创建用户报错ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value

使用如下语句添加用户: insert into mysql.user(Host,User,Password) values ("%","aas","Aas123456"); 错语原因: mysql用户表的中某些字段不能为空,没有默认值,其实是操作错误,mysql添加用户是不能这样直接insert user表的. 解决: create user 'aas'@'%' identified by 'Aas123456'; mysql创建用户报错ERRO

node.js创建服务器报错

创建nodeTest.js如下: 1 var http = require('http'); 2 http.createServer(function (request, response){ 3 response.writeHead(200, {'Content-Type' : 'text/plain'}); 4 response.end('hello world\n'); 5 }).listen(80); 6 7 console.log('server running at http://1

Ionic start 创建项目报错

Installing npm packages... Error with start undefined Error Initializing app: There was an error with the spawned command: npminstall There was an error with the spawned command: npminstall Caught exception: undefined ionic 2 创建项目的时候报错如上:本人试了好多方法,npm