kafka启动报错[could not be established. Broker may not be available.]

说明

kafka使用zookeeper,所以如果你没有启动zookeeper,那么可以使用下面命令,来启动一个内置的zookeeper软件。否则进行zookeeper的配置!

> bin/zookeeper-server-start.sh config/zookeeper.properties
[2013-04-22 15:01:37,495] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
...

kafka中zookeeper的配置

server.properties

############################# Zookeeper #############################

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
zookeeper.connect=hadoop:2181

# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=6000

kafka启动的配置

配置上监听端口,启动就不会报错了

listeners=PLAINTEXT://hadoop:9092

重新启动

[root@miv kafaka]# bin/kafka-server-start.sh config/server.properties

你可能感兴趣的:(大数据)