zookeeper 报错 mntr is not executed because it is not in the whitelist. 解决

文章
林里克斯

zookeeper 报错 mntr is not executed because it is not in the whitelist. 解决


实验平台:CentOS Linux release 7.6.1810 (Core)

zookeeper Version:Apache ZooKeeper, version 3.7.0 2021-03-17 09:46 UTC


1.详细报错

mntr is not executed because it is not in the whitelist.
#这表示 zookeeper 四字命令没有在白名单里导致。

2.验证命令是否在白名单里

$ echo conf | nc 10.10.13.5 2181
conf is not executed because it is not in the whitelist.
#这样就代表 conf 命令没有在白名单里面。验证需要 nc 命令

3.zookeeper 四字命令

stat        #查看状态信息
ruok        #查看 zookeeper 是否启动
dump        #列出没有处理的节点,临时节点
conf        #查看服务器配置
cons        #显示连接到服务端的信息
envi        #显示环境变量信息
mntr        #查看 zookeeper 的健康信息
wchs        #展示 watch 的信息
wchc和wchp   #显示 session 的 watch 信息 path 的 watch 信息

4.解决报错

$ vim /data/zookeeper/conf/zoo.cfg

4lw.commands.whitelist=*
#这代表允许使用所以命令
4lw.commands.whitelist=mntr
#代表值允许使用 mntr 命令

5.验证

$ echo conf | nc 10.10.13.5 2181
clientPort=2181
secureClientPort=-1
dataDir=/data/zookeeper/data/version-2
dataDirSize=457
dataLogDir=/data/zookeeper/data/version-2
dataLogSize=457
tickTime=2000
maxClientCnxns=60
minSessionTimeout=4000
maxSessionTimeout=40000
clientPortListenBacklog=-1
serverId=0

Over~

版权协议须知!

本篇文章来源于 Uambiguous ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

1399 0 2021-06-03


分享:
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif
博主卡片
林里克斯 博主大人
一个致力于Linux的运维平台
运维时间
搭建这个平台,只为分享及记载自己所遇之事和难题。

现在时间 2024-04-28

今日天气
站点统计
  • 文章总数:240篇
  • 分类总数:29个
  • 评论总数:10条
  • 本站总访问量 216702 次

@奥奥

@Wong arrhenius 牛比

@MakerFace 厉害了!