Zookeeper錯誤4_Zookeeper啟動時,bin/zkServer.sh: line 109: ./zookeeper.out: Permission denied STARTED錯誤
阿新 • • 發佈:2019-02-20
啟動Zookeeper過程中,一臺虛擬機器上出現如下的錯誤:
[hadoop@Slave2 zookeeper]$ bin/zkServer.sh start
JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... bin/zkServer.sh: line 109: ./zookeeper.out: Permission denied
STARTED
[hadoop@Slave2 zookeeper]$
根據字面意思,在對zookeeper.out檔案操作時,許可權不夠,解決方法是增加許可權:
[root@Slave2 hadoop]# cd /usr/local/zookeeper/ [root@Slave2 zookeeper]# cd bin [root@Slave2 bin]# ls README.txt zkCli.cmd zkEnv.cmd zkServer.cmd zookeeper.out zkCleanup.sh zkCli.sh zkEnv.sh zkServer.sh [root@Slave2 bin]# chmod a+xwr zookeeper.out [root@Slave2 bin]# ll total 48 -rwxr-xr-x. 1 hadoop hadoop 238 Feb 20 2014 README.txt -rwxr-xr-x. 1 hadoop hadoop 1937 Feb 20 2014 zkCleanup.sh -rwxr-xr-x. 1 hadoop hadoop 1049 Feb 20 2014 zkCli.cmd -rwxr-xr-x. 1 hadoop hadoop 1534 Feb 20 2014 zkCli.sh -rwxr-xr-x. 1 hadoop hadoop 1333 Feb 20 2014 zkEnv.cmd -rwxr-xr-x. 1 hadoop hadoop 2696 Feb 20 2014 zkEnv.sh -rwxr-xr-x. 1 hadoop hadoop 1084 Feb 20 2014 zkServer.cmd -rwxr-xr-x. 1 hadoop hadoop 5742 Feb 20 2014 zkServer.sh -rwxrwxrwx. 1 hadoop hadoop 8606 Oct 28 05:18 zookeeper.out [root@Slave2 bin]# ./zkServer.sh start JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED [root@Slave2 bin]
在root使用者下關閉,返回普通使用者下繼續啟動:
[hadoop@Slave2 bin]$ ./zkServer.sh start
JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
更改成功。