问题
通过
./kafka-server-start.sh ../config/server.properties
启动kafka
之前在server.properties中修改了brokcer.id=1
报错如下:
kafka.common.InconsistentBrokerIdException: Configured broker.id 1 doesn't match stored broker.id 0 in meta.properties. If you moved your data, make sure your configured broker.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
解决
先找到log目录
vi config/server.properties
搜索 log.dirs
log.dirs=/tmp/kafka-logs
cd /tmp/kafka-logs
修改:
broker.id=1