背景
zk启动成功后,接下来启动kafka,再启动kafka后一直说端口被占用。
端口占用解决办法:
netstat -aon|findstr 9092
taskkill -f -pid 7780
杀掉后,再次启动kafka时,问题并未解决
后来修改了批处理文件kafka-run-class.bat中的以下地方
fi
}
# need to check if called to start server or client
# in order to correctly decide about JMX_PORT
ISKAFKASERVER="false"
if [[ "$*" =~ "kafka.Kafka" ]]; then
ISKAFKASERVER="true"
fi
base_dir=$(dirname $0)/..
if [ -z "$SCALA_VERSION" ]; then
@@ -146,7 +153,7 @@ if [ -z "$KAFKA_JMX_OPTS" ]; then
f