3.31kafka 针对WARN No meta.properties file under dir /opt/apps/kafka/logs/meta.properties
启动zookeeper集群zkServer.sh start查看状态zkServer.sh status在虚拟机外部创建脚本start-kafka.sh添加权限chmod +x ./start-kafka.sh具体配置文件如下#!/bin/bashif [ $# -lt 1 ]thenecho "Input Args Error....."exitfifor i in flink01 flink0
·
启动zookeeper集群
zkServer.sh start
查看状态
zkServer.sh status
在虚拟机外部创建脚本start-kafka.sh
添加权限chmod +x ./start-kafka.sh
具体配置文件如下
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Input Args Error....."
exit
fi
for i in 192.168.74.139 192.168.74.128 192.168.74.140
do
case $1 in
start)
echo "==================START $i KAFKA==================="
ssh $i /opt/apps/kafka/bin/kafka-server-start.sh -daemon /opt/apps/kafka/config/server.properties
;;
stop)
echo "==================STOP $i KAFKA==================="
ssh $i /opt/apps/kafka/bin/kafka-server-stop.sh stop
;;
*)
echo "Input Args Error....."
exit
;;
esac
done
需要修改每个虚拟机的IP地址
路径需要修改
在这里小编就不做具体改变了
之后./start-kafka.sh start即可启动三台虚拟机的集群
解决错误:
[root@bogon kafka]# rm -rf logs/
[root@bogon kafka]# mkdir logs
[root@bogon kafka]# nohup bin/kafka-server-start.sh config/server.properties &
[1] 16021
[root@bogon kafka]# nohup: 忽略输入并把输出追加到'nohup.out'
[root@bogon kafka]# jps
26694 Kafka
9978 QuorumPeerMain
27119 Jps
上述只需删除文件夹logs即可
更多推荐
所有评论(0)