请选择 进入手机版 | 继续访问电脑版

zookeeper 无法启动(dataLogDir xxxxxx is missing. )

[复制链接]
查看540 | 回复0 | 2019-7-25 16:53:16 | 显示全部楼层 |阅读模式
一、故障现象

# cd /zookeeper目录/bin/
# ./zkServer.sh start输出如下信息:
  1. JMX enabled by default
  2. Using config: /usr/cmcc/zookeeper-3.4.6/bin/../conf/zoo.cfg
  3. Starting zookeeper ... STARTED
复制代码
查看zookeeper端口2181是否监听:
# netstat -ntlp | grep 2181
发现2181端口没起来。


二、解决方法

查看zookeeper日志:
# tail -200 /zookeeper目录/bin/zookeeper.out
  1. 2019-06-16 16:17:00,771 [myid:] - INFO  [main:QuorumPeerConfig@103] - Reading configuration from: /usr/cmcc/zookeeper-3.4.6/bin/../conf/zoo.cfg
  2. 2019-06-16 16:17:00,776 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid config, exiting abnormally
  3. org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /usr/cmcc/zookeeper-3.4.6/bin/../conf/zoo.cfg
  4.         at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:123)
  5.         at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
  6.         at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
  7. Caused by: java.lang.IllegalArgumentException: dataLogDir/home/superuser01/zookeeper/logs is missing.
  8.         at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:253)
  9.         at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:119)
  10.         ... 2 more
  11. Invalid config, exiting abnormally
复制代码
报错信息:/home/superuser01/zookeeper/logs is missing,看来是缺少目录的原因。
新建该目录:
# mkdir -p /home/superuser01/zookeeper/logs
然后再启动zookeeper,故障解决。




上一篇:zookeeper Error contacting service. It is probably not running
下一篇:zookeeper无法启动(failed to run command `/xx/xx/jdk/bin/java)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1249

主题

2736

帖子

7万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
70188
QQ