I'm new to Apache Kafka. I've installed it into a Ubuntu Linux VM (18.04).
I've started up Zookeeper from the Kafka directory with the default configuration.
The Zookeeper looks like it started successfully. From another Terminal window I am attempting to test. I'm connecting to it with Telnet and am attempting to send a "stat" command.
When I do so, I get the following error message:
I'm a newbie to Apache/kafka and have limited linux experience. I googled around but it wasn't really clear to me how to update the whitelist.
I found the following snippet from Zookeeper documentation:
4lw.commands.whitelist (Java system property: zookeeper.4lw.commands.whitelist)
New in 3.4.10: This property contains a list of comma separated Four Letter Words commands. It is introduced to provide fine grained control over the set of commands ZooKeeper can execute, so users can turn off certain commands if necessary. By default it contains all supported four letter word commands except "wchp" and "wchc", if the property is not specified. If the property is specified, then only commands listed in the whitelist are enabled.
Here's an example of the configuration that enables stat, ruok, conf, and isro command while disabling the rest of Four Letter Words command: 4lw.commands.whitelist=stat, ruok, conf, isro Users can also use asterisk option so they don't have to include every command one by one in the list. As an example, this will enable all four letter word commands: 4lw.commands.whitelist=*
Can someone please explain the whitelist usage and how to correctly initialize it?
Thanks, JohnB
By default, Admin Server binds to port 8080, in case port 8080 already in use this exception will be thrown. Add below property to conf/zoo. cfg file and restart zk server. That easy- I will try and report.
The ZooKeeper service can be monitored in one of two primary ways; 1) the command port through the use of 4 letter words and 2) JMX. See the appropriate section for your environment/requirements.
For me, adding one of the following lines (or a variation) to the config/zookeeper.properties
file (in the installation folder) worked.
4lw.commands.whitelist=stat, ruok, conf, isro
4lw.commands.whitelist=*
This worked for me; setting the environment variable on the command line.
KAFKA_OPTS="-Dzookeeper.4lw.commands.whitelist=*" bin/zookeeper-server-start.sh config/zookeeper.properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With