关于Zookeeper连接时报出一下错误:
- Opening socket conection to server 127.0.0.1/127.0.0.1:2181. Will not atte pt to authenticate using SASL (unknown error)
- KeeperErrorCode = ConnectionLoss for /test
- org.apache.zookeeper.KeeperException$OperationTimeoutException:KeeperErrorCode = OperationTimeout
关于以上三个问题解释一下;在windows本地搭建配置zookeeper服务端,然后代码测试,出现了1,2问题;3的问题是项目报出的问题;此处没有防火墙,jar,hosts冲突等问题;
解决方法:查看自己配置的zoo.cfg
- dataDir
- dataLogDir
这里的路径配置为全路径,比如 D:\\Users\wb\\ soft\\zookeeper-3.4.14\\data;D:\\Users\wb\\ soft\\zookeeper-3.4.14\\log;注意是双反斜杠'\\'