启动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
更改成功。
转自:http://blog.csdn.net/wang_zhenwei/article/details/49488003
所有评论(0)