赞
踩
启动报错误:
- [root@Hadoop ~]# zook
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Starting zookeeper ... STARTED
- [root@Hadoop ~]# cd /opt/modules/zookeeper-3.4.5/bin
- [root@Hadoop bin]# ./zkServer.sh status
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Error contacting service. It is probably not running.
- [root@Hadoop bin]#
解决办法 :
[root@Hadoop bin]# cd ../zkData/
[root@Hadoop zkData]# ls
my.id zookeeper_server.pid
[root@Hadoop zkData]# cat my.id
1
[root@Hadoop zkData]# vi my.id
[root@Hadoop zkData]# cd ./bin
-bash: cd: ./bin: No such file or directory
[root@Hadoop zkData]# cd ..
[root@Hadoop zookeeper-3.4.5]# cd bin
[root@Hadoop bin]# ./zkServer.sh stop
JMX enabled by default
Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
Stopping zookeeper ... ./zkServer.sh: line 143: kill: (2605) - No such process
STOPPED
[root@Hadoop zkData]# ls
my.id zookeeper_server.pid
[root@Hadoop zkData]# rm -rf zookeeper_server.pid
[root@Hadoop zkData]# cat my.id
1
[root@Hadoop zkData]# cd ../bin
[root@Hadoop bin]# ./zkServer.sh start
JMX enabled by default
Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@Hadoop bin]# ./zkServer.sh status
主要需要查询日志然后才可以进行启动哦:
操作步骤在bin的下面查询。out日志
- [root@Hadoop zkData]# cd ../bin
- [root@Hadoop bin]# ./zkServer.sh start
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Starting zookeeper ... STARTED
- [root@Hadoop bin]# ./zkServer.sh status
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Error contacting service. It is probably not running.
- [root@Hadoop bin]# ls
- README.txt zkCleanup.sh zkCli.cmd zkCli.sh zkEnv.cmd zkEnv.sh zkServer.cmd zkServer.sh zookeeper.out
- [root@Hadoop bin]# tail -f zookeeper.out
- 2020-02-28 23:04:41,337 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid config, exiting abnormally
- org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:121)
- at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
- at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
- Caused by: java.lang.IllegalArgumentException: /opt/modules/zookeeper-3.4.5/zkData/myid file is missing
- at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:344)
- at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:117)
- ... 2 more
- Invalid config, exiting abnormally
- ^C
- [root@Hadoop bin]# cd ../zkData/
- [root@Hadoop zkData]# ls
- my.id zookeeper_server.pid
- [root@Hadoop zkData]# mv my.id myid
- [root@Hadoop zkData]# ls
- myid zookeeper_server.pid
- [root@Hadoop zkData]# zook
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Starting zookeeper ... STARTED
- [root@Hadoop zkData]#
然后查询状态,就是启动正常:
- [root@Hadoop ~]# cd /opt/modules/zookeeper-3.4.5/bin
- [root@Hadoop bin]# ./zkServer.sh status
- JMX enabled by default
- Using config: /opt/modules/zookeeper-3.4.5/bin/../conf/zoo.cfg
- Mode: follower
- [root@Hadoop bin]#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。