Troubleshooting: Whitelisting Four-letter Commands in ZooKeeper

Affects:

  • ZooKeeper

Condition or Error

Available: ZooKeeper Availability

This article only applies up to LogScale version 1.107. The requirement for ZooKeeper was removed in 1.108.

  • LogScale does not report statistics for ZooKeeper

  • ZooKeeper Cluster page within LogScale System Administration page shows an Unavailable message

  • LogScale reports ERROR: ZooKeeper is not configured correctly. Please whitelist mntr and stat using 4lw.commands.whitelist property.

Causes

  • ZooKeeper has not been configured to support four-letter commands. This prevents LogScale from running the mntr and stat commands which return additional configuration information.

Solutions

  • The ZooKeeper configuration must be edited so that four-letter commands are allowed.

    You can enable this by editing the ZooKeeper configuration file, zookeeper.properties, by adding:

    ini
    4lw.commands.whitelist=*

    This enables all four-letter commands.

    If you want to restrict it only to the commands required by LogScale

    ini
    4lw.commands.whitelist=stat, mntr

    Alternatively you can add it to the environment variables when running ZooKeeper:

    shell
    $ KAFKA_OPTS="-Dzookeeper.4lw.commands.whitelist=*" bin/zookeeper-server-start.sh