kafka 创建 topic 报错 Error: Exception thrown by the agent : java.rmi.server.ExportException: Port alrea
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 9988; nested exception is:
java.net.BindException: Address already in use
kafka-run-class.sh 里面改动
加以下一句
ISKAFKASERVER="false"
if [[ "$*" =~ "kafka.Kafka" ]]; then
ISKAFKASERVER="true"
fi
改动这一行
if [ $JMX_PORT ] && [ -z "$ISKAFKASERVER" ]; then
参考 https://github.com/apache/kafka/pull/1983/commits/2c5d40e946bcc149b1a9b2c01eced4ae47a734c5