Grokbase Groups HBase dev July 2012
FAQ
After successful compilation when I try to run a create table command
I get an error as follows


12/07/07 02:41:49 ERROR
client.HConnectionManager$HConnectionImplementation: Can't get connection
to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

Please let me know what is the issue !

--
_________________________________________________________
Regards,
Varun

Search Discussions

  • Harsh J at Jul 7, 2012 at 9:51 am
    Your HBase shell isn't able to make a proper connection to ZooKeeper.
    Have you configured the property hbase.zookeeper.quorum properly, and
    is ZooKeeper fully up? We can help better if we have more info about
    your environment.
    On Sat, Jul 7, 2012 at 1:14 PM, Varun kumar wrote:
    After successful compilation when I try to run a create table command
    I get an error as follows


    12/07/07 02:41:49 ERROR
    client.HConnectionManager$HConnectionImplementation: Can't get connection
    to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

    Please let me know what is the issue !

    --
    _________________________________________________________
    Regards,
    Varun


    --
    Harsh J
  • Varun kumar at Jul 7, 2012 at 3:24 pm
    Hi,

    I changed the hbase-site.xml and the zookeeper was up.
    I was able to create a table from the shell.

    In eclipse I created a new project and added references to hbase-server,
    hbase-common and hbase-it
    projects.

    Comiplation was successful.
    When I try to run the program I get an error !

    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/zookeeper/Watcher
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at
    org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:204)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:150)
    at HbaseTest.Hbaseconnector.main(Hbaseconnector.java:25)


    Also is there is a standard procedure to create new applications and debug
    the existing source code during run time ?

    Thank you !











    On Sat, Jul 7, 2012 at 4:50 AM, Harsh J wrote:

    Your HBase shell isn't able to make a proper connection to ZooKeeper.
    Have you configured the property hbase.zookeeper.quorum properly, and
    is ZooKeeper fully up? We can help better if we have more info about
    your environment.
    On Sat, Jul 7, 2012 at 1:14 PM, Varun kumar wrote:
    After successful compilation when I try to run a create table command
    I get an error as follows


    12/07/07 02:41:49 ERROR
    client.HConnectionManager$HConnectionImplementation: Can't get connection
    to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

    Please let me know what is the issue !

    --
    _________________________________________________________
    Regards,
    Varun


    --
    Harsh J


    --
    _________________________________________________________
    Regards,
    Varun
  • Harsh J at Jul 7, 2012 at 3:57 pm
    You require the ZooKeeper jars to be in the classpath of your JVM when
    you run any HBase application. If you use the m2e plugin to create
    Java Projects with Maven in Eclipse, it handles such dependencies well
    and automatically. Otherwise, consider getting the zookeeper jar from
    the tar-pack/etc. and add it to your build path manually.
    On Sat, Jul 7, 2012 at 8:54 PM, Varun kumar wrote:
    Hi,

    I changed the hbase-site.xml and the zookeeper was up.
    I was able to create a table from the shell.

    In eclipse I created a new project and added references to hbase-server,
    hbase-common and hbase-it
    projects.

    Comiplation was successful.
    When I try to run the program I get an error !

    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/zookeeper/Watcher
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at
    org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:204)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:150)
    at HbaseTest.Hbaseconnector.main(Hbaseconnector.java:25)


    Also is there is a standard procedure to create new applications and debug
    the existing source code during run time ?

    Thank you !











    On Sat, Jul 7, 2012 at 4:50 AM, Harsh J wrote:

    Your HBase shell isn't able to make a proper connection to ZooKeeper.
    Have you configured the property hbase.zookeeper.quorum properly, and
    is ZooKeeper fully up? We can help better if we have more info about
    your environment.

    On Sat, Jul 7, 2012 at 1:14 PM, Varun kumar <varun15082008@gmail.com>
    wrote:
    After successful compilation when I try to run a create table command
    I get an error as follows


    12/07/07 02:41:49 ERROR
    client.HConnectionManager$HConnectionImplementation: Can't get connection
    to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

    Please let me know what is the issue !

    --
    _________________________________________________________
    Regards,
    Varun


    --
    Harsh J


    --
    _________________________________________________________
    Regards,
    Varun


    --
    Harsh J

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedJul 7, '12 at 7:44a
activeJul 7, '12 at 3:57p
posts4
users2
websitehbase.apache.org

2 users in discussion

Varun kumar: 2 posts Harsh J: 2 posts

People

Translate

site design / logo © 2022 Grokbase