kafka集群+zookeeper集群常见问题与命令
2016-06-30 21:35
381 查看
常见疑问
1、生产者无法产生消息kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
将slf4j-nop-1.7.21.jar上传到kafka的lib包下
参考文章:http://stackoverflow.com/questions/23903843/apache-kafka-example-error-failed-to-send-message-after-3-tries
常用命令
zk启动
[root@localhost bin]# ./zkServer.sh startkafka启动
[root@localhost bin]# ./kafka-server-start.sh -daemon ../config/server.properties创建topic
[root@localhost bin]# ./kafka-topics.sh –create –zookeeper 192.168.21.49:12181 –replication-factor 1 –partitions 1 –topic test查看当前集群的可用topic
[root@localhost bin]# ./kafka-topics.sh –list –zookeeper 192.168.21.14:12181SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/kafka/kafka_2.10-0.10.0.0/libs/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/kafka/kafka_2.10-0.10.0.0/libs/slf4j-nop-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
TEST-TOPIC
test
wangdan
wangdan1
wangdan2
查看每个topic的运行情况
[root@localhost bin]# ./kafka-topics.sh –list –zookeeper 192.168.21.14:12181SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/kafka/kafka_2.10-0.10.0.0/libs/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/kafka/kafka_2.10-0.10.0.0/libs/slf4j-nop-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
TEST-TOPIC
test
wangdan
wangdan1
wangdan2
相关文章推荐
- Dubbo-admin 不支持JDK8 解决办法
- 对外提供dubbo服务的最佳实践
- 搭建分布式架构2--CentOs下安装Tomcat7(环境准备)
- 搭建分布式架构4--ZooKeeper注册中心安装
- 搭建分布式架构5--ZooKeeper 集群的安装 3ff0
- dubbo-2.5.4-SNAPSHOT 小bug处理。
- Zookeeper注册中心安装
- dubbo + spring + mybaits 的pom文件列一
- dubbo使用简单说明
- Apache Ignite 网格计算 (可用来取代dubbo等分布式RPC)与 spring 整合
- dubbo提供者出现不明外网ip注册的问题
- SpringBoot+Dubbo+Mybatis 项目升级版本(Gradle)
- Dubbo与Zookeeper、SpringMVC整合和使用
- dubbo管理控制台安装和使用
- 基于开源Dubbo分布式RPC服务框架的部署整合
- dubbo系列----rpc初探