Error Starting zookeeper, setting relative path Resolves the issue.

This topic contains 1 reply, has 2 voices, and was last updated by  Yi Zhang 1 year, 6 months ago.

  • Creator
    Topic
  • #31378

    Jayashankar VS
    Participant

    Team,
    Just want to bring to your notice a issue with regard to starting zookeeper (/usr/lib/zookeeper/bin/zkServer.sh start /etc/zookeeper/conf/zoo.cfg)
    I am following the “Hadoop manual installation document”. Though in the beginning of the document under section “Define Directories for Ecosystem Components” the ZOOKEEPER_DATA_DIR is set to “/grid1/hadoop/zookeeper/data” in the later part of the document when the actual installation is happening the document only asks to change server.1, .2 and .3 parameters in zoo.cfg to reflect the zookeeper server. As a result the default setting for dataDir remains unchanged to /var/zookeeper/data as shown below.

    dataDir=/var/zookeper/data/

    Now starting zookeeper throws below exception stating that it doesn’t have the permission to create directory, which is correct due to the fact that /var is under root hence using a relative path like this ‘dataDir=../zookeper/data/’ solved the problem other way would be to try starting zookeeper as sudo.

    This is a very small issue but still thought to give a heads-up.

    2013-08-12 10:22:24,011 – INFO [main:Environment@100] – Server environment:user.home=/home/zookeeper
    2013-08-12 10:22:24,011 – INFO [main:Environment@100] – Server environment:user.dir=/var/zookeeper/data/version-2
    2013-08-12 10:22:24,018 – ERROR [main:ZooKeeperServerMain@63] – Unexpected exception, exiting abnormally
    java.io.IOException: Unable to create data directory /var/zookeper/data/version-2
    at org.apache.zookeeper.server.persistence.FileTxnSnapLog.(FileTxnSnapLog.java:85)
    at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:103)
    at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
    at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

Viewing 1 replies (of 1 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #31402

    Yi Zhang
    Moderator

    Hi Jay,

    Thanks for pointing out this error. We have informed our documentation team to change it.

    Thanks,
    Yi

    Collapse
Viewing 1 replies (of 1 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.