jvm - ZooKeeper gives exiting JVM with error code 2 error
问题描述
I have openjdk16.0.1, zookeper and kafka in my machine.
When I use the command "zkServer.cmd start" it gives me the error below.
ERROR [main:QuorumPeerMain@99] - Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing C:\Users\****\Desktop\apache-zookeeper-3.7.0-bin\bin\..\conf\zoo.cfg
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:198)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:125)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:91)
Caused by: java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.base/java.util.Properties.loadConvert(Properties.java:672)
at java.base/java.util.Properties.load0(Properties.java:456)
at java.base/java.util.Properties.load(Properties.java:408)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:185)
... 2 more
Invalid config, exiting abnormally
2021-04-30 17:25:17,422 [myid:] - INFO [main:ZKAuditProvider@42] - ZooKeeper audit is disabled.
2021-04-30 17:25:17,428 [myid:] - ERROR [main:ServiceUtils@42] - Exiting JVM with code 2
Is there any solution for this?
tickTime=2000
initLimit=10
syncLimit=5
dataDir=C:\Users\myUserName\Desktop\apache-zookeeper-3.7.0-bin\data clientPort=2181
Now I changed the place of the zookeper folder. it is now under C:
dataDir=C:\apache-zookeeper-3.7.0-bin\data
However, there is still and error. This time:
ERROR [main:ZooKeeperServerMain@70] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "C:\apache-zookeeper-3.7.0-bin\bin\..\conf\zoo.cfg"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:660)
at java.base/java.lang.Integer.parseInt(Integer.java:778)
at org.apache.zookeeper.server.ServerConfig.parse(ServerConfig.java:78)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:110)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:68)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:141)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:91)
解决方案
推荐阅读
- php - 从搜索结果中排除带有设置自定义字段(元)的帖子
- sql - 如何在 SQL 中计算两个日期之间的行数?
- c# - 如何在 Angular 9 中使用 CryptoJS 来获得与 C# Rfc2898DeriveBytes 相同的加密字符串
- eclipse - 为无源代码的Eclipse插件提供javadoc插件
- javascript - 发布消息时在 jQuery 中使用 addClass 创建一个新框
- node.js - 从 Express 服务器下载文件
- c++ - try-catch 无法在 dlopen 加载的共享库中捕获异常
- powerbi - 如何添加列以将 WEEKNUM 显示为“开始日期 - 结束日期”?
- c# - 如何将单独控制台窗口的输出传递到 Visual Studio 输出窗口?
- spring - Spring Boot 注释,Thymeleaf