解决Zookeeper报错:conf is not executed because it is not in the whitelist的解决办法

Posted ws0316

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Zookeeper报错:conf is not executed because it is not in the whitelist的解决办法相关的知识,希望对你有一定的参考价值。

1.echo wchp | nc localhost 2181 ,通过路径列出服务器 watch 的详细信息,且它会输出一个与 session 相关的路径。但是出现下面的错误。

[root@xg61 conf]# echo wchp | nc localhost 2181
wchp is not executed because it is not in the whitelist.

2.cd /usr/local/zookeeper/conf下,用vim打开zoo.cfg,在最后添加:

4lw.commands.whitelist=*

3.重启Zookeeper的服务器和客户端。

./zkServer.sh restart
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

服务器重启成功,接着开启客户端。

[root@xg61 bin]# ./zkCli.sh

以上是关于解决Zookeeper报错:conf is not executed because it is not in the whitelist的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

解决ZooKeeper集群节点状态报错Client address: localhost. Error contacting service. It is probably not running

解决ZooKeeper集群节点状态报错Client address: localhost. Error contacting service. It is probably not running

启动Zookeeper报错:Error contacting service. It is probably not running.

kafka 创建消费者报错 consumer zookeeper is not a recognized option

Zookeeper- Error contacting service. It is probably not running解决方案和原理

zookeeper集群查看状态时报错Error contacting service. It is probably not running的一些坑以及解决办法