Zookeeper错误5_重装Zookeeper彻底解决bin/zkServer.sh: line 109: ./zookeeper.out: Permission denied STARTED

前面提到过bin/zkServer.sh: line 109: ./zookeeper.out: Permission denied STARTED错误的解决方法,但是,今天再次启动Zookeeper后,同样的错误再次出现,再查找其他解决方法无效后,准备重装Zookeeper。

具体过程如下:

在Slave1上:

[hadoop@Slave1 ~]$ su
Password: 
[root@Slave1 hadoop]# cd /usr/local/
[root@Slave1 local]# tar -zcf ./zookeeper.tar.gz ./zookeeper
[root@Slave1 local]# scp zookeeper.tar.gz Slave2:/usr/local/
root@slave2's password: 
zookeeper.tar.gz                              100%   18MB  17.9MB/s   00:00    
[root@Slave1 local]# 

Slave2上:

解压:

[hadoop@Slave2 ~]$ cd /usr/local/
[hadoop@Slave2 local]$ su
Password: 
[root@Slave2 local]# tar -zxvf zookeeper.tar.gz -C /usr/local/


修改配置及启动:

[root@Slave2 local]# cd /usr/local/zookeeper/zkdata/
[root@Slave2 zkdata]# ls
myid  version-2  zookeeper_server.pid
[root@Slave2 zkdata]# vim myid  #这里,将myid中的“1”改成“2”
[root@Slave2 zkdata]# cd ../..
[root@Slave2 local]# chown -R hadoop:hadoop zookeeper
[root@Slave2 local]# ll
total 18392
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 bin
drwxr-xr-x.  7 hadoop hadoop     4096 Oct 27 22:59 elasticsearch
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 etc
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 games
drwxr-xr-x. 11 hadoop hadoop     4096 Oct 29 01:44 hadoop
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 include
drwxr-xr-x.  4 hadoop hadoop     4096 Oct 27 19:35 java
drwxr-xr-x.  6 hadoop hadoop     4096 Sep  9 10:27 kafka
drwxr-xr-x.  7 hadoop hadoop     4096 Sep  8 13:12 kibana
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 lib
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 lib64
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 libexec
drwxr-xr-x.  6 hadoop hadoop     4096 Oct 27 23:46 logstash
drwxr-xr-x.  3 hadoop hadoop     4096 Sep  5 18:21 mongodb
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 sbin
drwxr-xr-x.  5 root   root       4096 Aug 25 01:40 share
drwxr-xr-x.  2 root   root       4096 Sep 23  2011 src
drwxrwxrwx. 11 hadoop hadoop     4096 Oct 28 00:02 zookeeper
-rw-r--r--.  1 root   root   18756343 Nov  2 18:13 zookeeper.tar.gz
[root@Slave2 local]# cd zookeeper
[root@Slave2 zookeeper]# exit
exit
[hadoop@Slave2 local]$ cd /usr/local/zookeeper
[hadoop@Slave2 zookeeper]$ bin/zkServer.sh start
JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@Slave2 zookeeper]$ bin/zkServer.sh status
JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Mode: follower
[hadoop@Slave2 zookeeper]$ 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值