使用zookeeper报错 stat is not executed because it is not in the whitelist. envi is not executed because it is not in the whitelist.

在使用四字命令或者zk ui界面查看zookeeper集群时,出现如下提示:

stat is not executed because it is not in the whitelist.
envi is not executed because it is not in the whitelist.

解决办法

# nc命令需要安装其他软件
yum install nmap-ncat

# envi命令执行报错提示:envi is not executed because it is not in the whitelist.
# 解决办法 修改启动指令 zkServer.sh ,往里面添加 :ZOOMAIN="-Dzookeeper.4lw.commands.whitelist=* ${ZOOMAIN}"

else
    echo "JMX disabled by user request" >&2
    ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" # 注意找到这个信息
fi

# 如果不想添加在这里,注意位置和赋值的顺序
ZOOMAIN="-Dzookeeper.4lw.commands.whitelist=* ${ZOOMAIN}"

然后重启zookeeper
posted @ 2019-09-20 10:41  哈喽哈喽111111  阅读(4163)  评论(0编辑  收藏  举报