Zookeeper: FAILED TO WRITE PID

后端 未结 3 530
挽巷
挽巷 2021-01-25 15:19

So I\'m trying to to get started with Accumulo. I installed Hadoop and it runs w/o problems but when I try to start Zookeeper I get:

JMX enabled by default
Usin         


        
3条回答
  •  走了就别回头了
    2021-01-25 16:09

    zookeeper distributed with default conf, uses /tmp/zookeeper as dataDir for just example sake. It is suggested changing this value in /path/to/zookeeper/conf/zoo.cfg to /var/lib/zookeeper.

    Creating /var/lib/zookeeper needs root access, so sudo is required. This directory when created will have following permissions.

    ls -al  /var/lib/zookeeper/
    drwxr-xrwx  4 root           wheel  128 May  9 14:03 .
    

    When zookeeper is started without root permission, it cannot write to this directory. hence fails with error

    ... /usr/local/zookeeper/bin/zkServer.sh: line 169: /var/lib/zookeeper/zookeeper_server.pid: Permission denied
    FAILED TO WRITE PID
    

    You need to give write permissions to allow user starting zookeeper to write to /var/lib/zookeeper. In my case, as I am using it in local, I used the following command and it worked

    sudo chmod o+w /var/lib/zookeeper
    

提交回复
热议问题