0
votes

I'm trying to start two zookeeper instances required for kafka cluster on two different ports with different log directories. However I'm getting below error when I'm trying to start second zookeeper -

D:\Kafka\kafka_2.12-2.3.0 - Copy>bin\windows\zookeeper-server-start.bat config\zookeeper.properties Unrecognized option: - Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

1
Hi, welcome to StackOverflow! Are there any logs written when you run it? Have you tried it without spaces in the folder name? - Robin Moffatt

1 Answers

0
votes

You don't need to copy folders, only zookeeper.properties and you should never run only 2 ZKs anyway

Regarding the error, Unrecognized option: -... Don't copy folders, like I said, and make sure there are no spaces in the path to Zookeeper scripts

Note: this setup is highly discouraged even with separate directories because your failure domain is still that OS / machine. Kafka only requires a minimum of one Zookeeper to function