Troubleshooting: Whitelisting Four-letter Commands in Zookeeper

Last Updated: 2021-09-01

Affects:

  • Zookeeper

Condition or Error

  • Humio does not report statistics for Zookeeper

  • Zookeeper Cluster page within Humio System Administration page shows an Unavailable message

  • Humio 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 Humio from running the mntr and stat commands which return additional configuraiton 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 files
    4lw.commands.whitelist=*

    This enables all four-letter commands.

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

    ini files
    4lw.commands.whitelist=stat, mntr

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

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