FAILED TO WRITE PID installing Zookeeper

后端 未结 11 2906
小蘑菇
小蘑菇 2021-02-19 22:10

I am new to Zookeeper and it has being a real issue to install it and run. I am not sure what is wrong in here but I will explain what I\'ve being doing to make it more clear:

相关标签:
11条回答
  • 2021-02-19 22:19

    try to use sudo -E bin/zkServer.sh start

    0 讨论(0)
  • 2021-02-19 22:21

    This happens to me due to low disk space. cause zookeeper cant create pid file inside zookeeper data folder.

    0 讨论(0)
  • 2021-02-19 22:21

    I have faced the same issue while starting the zookeeper with this command:

    hadoop@ubuntu:~/hadoop/zookeeper/zookeeper-3.4.8$ bin/zkServer.sh start

    ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper.

    It should have been written by the master. Check the value configured in zookeeper.znode.parent. There could be a mismatch with the one configured in the master.

    But running the script as su rectified the issue:

    hadoop@ubuntu:~/hadoop/zookeeper/zookeeper-3.4.8$ sudo bin/zkServer.sh start

    ZooKeeper JMX enabled by default Using config: /home/hadoop/hadoop/zookeeper/zookeeper-3.4.8/bin/../conf/zoo.cfg Starting zookeeper ... STARTED

    0 讨论(0)
  • 2021-02-19 22:22

    The default zookeeper installation (tar extract) comes with the conf file named conf/zoo_sample.cfg while the same extract's bin/zkServer.sh expects the conf file to be called zoo.cfg thereby resulting in a "No such file or dir" and the "failed to write pid" error. So before running zkServer.sh to start or stop zookeeper instance, either:

    • rename the zoo_sample.cfg in the conf dir to zoo.cfg, or
    • give the name (and path) to the conf file (as suggested by Ilya Lapitan), or, of course
    • edit zkServer.sh ;-)
    0 讨论(0)
  • 2021-02-19 22:31

    I have had the same problem. In my case was useful to start Zookeeper and directly specify a configuration file:

    /bin/zkServer.sh start conf/zoo.conf

    0 讨论(0)
  • 2021-02-19 22:34

    When you create the Directory for dataDir make sure to use the -p option. This will allow subsequent directories to be created as required by the application placing files.

    mkdir -p /var/log/zookeeperData Then set:

    dataDir=/var/log/zookeeperData

    0 讨论(0)
提交回复
热议问题