已解决:rm: 无法删除“/opt/module/zookeeper-3.4.10/zkData/zookeeper_server.pid“: 权限不够

时间:2024-11-08 18:48:57

.......................................................................................................................................................... 

解决:

.......................................................................................................................................................... 

ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.4.10/bin/../conf/
Stopping zookeeper ... /opt/module/zookeeper-3.4.10/bin/: 第 182 行:kill: (4149) - 不允许的操作
rm: 无法删除"/opt/module/zookeeper-3.4.10/zkData/zookeeper_server.pid": 权限不够
STOPPED的问题

.......................................................................................................................................................... 

问题描述:

.......................................................................................................................................................... 

在我关闭zookeeper集群的时候,发现报错

 这里它说我们权限的不够,无法对该目录下的pid文件删除,那么我们赋予它权限就好了。

.......................................................................................................................................................... 

有些人可能对文件赋予权限的做法是这样的。

.......................................................................................................................................................... 

.......................................................................................................................................................... 

这是错误的。这样做其实只对zookeeper-3.4.10给予了权限,里面的文件并没有给予。

.......................................................................................................................................................... 

解决方法:多加一个“-R”递归赋予文件夹权限。

.......................................................................................................................................................... 

 

sudo chmod 777 -R zookeeper-3.4.10/

.......................................................................................................................................................... 

 重新执行 stop指令。

.......................................................................................................................................................... 

问题解决,成功关闭zookeeper。 

.......................................................................................................................................................... 

Guff_hys_python数据结构,大数据开发学习,python实训项目-****博客