For windows server 2016 and JDK 11 running via git bash, I kept receiving:
[0.006s][error][logging] Error opening log file '/e/apps/Apache/Kafka/kafka_2.13-3.6.0/bin/../logs/zookeeper-gc.log': No such file or directory
[0.006s][error][logging] Initialization of output 'file=/e/apps/Apache/Kafka/kafka_2.13-3.6.0/bin/../logs/zookeeper-gc.log' using options 'filecount=10,filesize=100M' failed.
Invalid -Xlog option '-Xlog:gc*:file=/e/apps/Apache/Kafka/kafka_2.13-3.6.0/bin/../logs/zookeeper-gc.log:time,tags:filecount=10,filesize=100M', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I had seen it required a minimum Java version of 8+ and that it was moaning about some logging, I had seen in the kafka-run.sh that it was doing something funky based on the java version with the log files so I set it instead to JDK 8 and everything started properly (zookeeper wise). I then tried to start kafka and it started fine.
Note: my java path and home were messed up/not present so in
kafka-run-class.sh
I did add at the top:
JAVA_HOME=/C/apps/jdk1.8.0_241
JAVA=/C/apps/jdk1.8.0_241/bin/java