Swanand
Swanand

Reputation: 131

Is it possible to run multiple Zookeeper instances with different port on single machine?

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.

Upvotes: 0

Views: 1511

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191874

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

Upvotes: 1

Related Questions