Launching multiple Kafka brokers fails
Edit config/serverTest.properties and replace the existing config values as follows:
broker.id=2
port=9093
log.dir=/tmp/kafka-logs-2
If you want a third broker:
cp config/server.properties config/server3.properties
Edit config/server3.properties and replace the existing config values as follows:
broker.id=3
port=9094
log.dir=/tmp/kafka-logs-3
if you run on different machines you must change
advertised.host.name=192.168.x.x
else if you run in the same vmware machine, for example you should only change the port and log.dir as described above
And, speaking from experience, don't forget to edit the broker.id entries in the kafka-logs-*/meta.properties files to match your changes (or delete the files and let kafka regenerate them).
This is old question, still this answer should help others. The problem is when you create new server.properties from existing server.properties, below line will get copied:
# A comma separated list of directories under which to store log files
log.dirs=/tmp/kafka-logs
So, even new broker tries to use the same log dir and hence it uses the meta.properties of kafka-logs which is created by broker 0 and has broker id as 0.
So, go to /tmp and delete all kafka-logs* files and then comment log.dirs=/tmp/kafka-logs
and then add the lines as you have added :)