我无法启动zookeeper服务。请查看堆栈跟踪。
跟踪1: org.apache.zookeeper.server.ZooKeeperServer:
Severe unrecoverable error, exiting
java.io.FileNotFoundException: /var/lib/zookeeper/version-2/snapshot.40003a3c3 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at org.apache.zookeeper.server.persistence.FileSnap.serialize(FileSnap.java:225)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.save(FileTxnSnapLog.java:275)
at org.apache.zookeeper.server.ZooKeeperServer.takeSnapshot(ZooKeeperServer.java:270)
at org.apache.zookeeper.server.SyncRequestProcessor$1.run(SyncRequestProcessor.java:123)
跟踪2: org.apache.zookeeper.server.SyncRequestProcessor:
Severe unrecoverable error, exiting
java.io.FileNotFoundException: /var/lib/zookeeper/version-2/log.40003a3c5 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at org.apache.zookeeper.server.persistence.FileTxnLog.append(FileTxnLog.java:205)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.append(FileTxnSnapLog.java:347)
at org.apache.zookeeper.server.ZKDatabase.append(ZKDatabase.java:476)
at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:110)
我试过了 -
/var/lib/zookeeper
更改为最后777。 /var/lib/zookeeper2
答案 0 :(得分:0)
你需要使用'/ var / lib /文件夹作为dataDir吗? '/ var / lib'文件夹是一个特殊的文件夹,通常由os包使用。
如果您将dataDir和dataLogDir更改为用户特定位置,它将起作用。