Problem simple with Java client from OSX – HDP 2 Sandbox under VBox

to create new topics or reply. | New User Registration

This topic contains 3 replies, has 3 voices, and was last updated by  Kieran Beltran 1 year, 8 months ago.

  • Creator
  • #43898

    I am trying to get a simple Java client application running to test a HDP 2.0 Sandbox on OSX.

    I am invoking the following client under OSX to test with command line args: horton, 2181

    public class TestHortonSandbox {
    public static void main(String[] args) throws IOException {
    Configuration config = HBaseConfiguration.create();
    config.set(“hbase.zookeeper.quorum”, args[0]);
    config.set(“”, args[1]);
    try {
    } catch (MasterNotRunningException e) {
    System.out.println(“HBase is not running.”);
    } catch (ServiceException e) {
    System.out.println(“Service Exception”);
    System.out.println(“*** Things look healthy ***”);

    I am receiving the following error:

    2013-11-17 06:55:28,952 INFO [main] zookeeper.ZooKeeper ( – Initiating client connection, connectString= sessionTimeout=90000 watcher=hconnection-0x5f8fb0ca
    2013-11-17 06:55:28,967 INFO [main] zookeeper.RecoverableZooKeeper ( – Process identifier=hconnection-0x5f8fb0ca connecting to ZooKeeper ensemble=
    2013-11-17 06:55:29,002 INFO [main-SendThread(horton:2181)] zookeeper.ClientCnxn ( – Opening socket connection to server horton/ Will not attempt to authenticate using SASL (unknown error)
    2013-11-17 06:55:29,007 INFO [main-SendThread(horton:2181)] zookeeper.ClientCnxn ( – Socket connection established to horton/, initiating session
    2013-11-17 06:55:29,014 INFO [main-SendThread(horton:2181)] zookeeper.ClientCnxn ( – Session establishment complete on server horton/, sessionid = 0x14265e8aa4f0007, negotiated timeout = 40000
    2013-11-17 06:55:29,018 INFO [main] client.ZooKeeperRegistry ( – ClusterId read in ZooKeeper is null
    2013-11-17 06:55:29,058 INFO [main] client.HConnectionManager$HConnectionImplementation ( – getMaster attempt 1 of 1 failed; no more retrying. Can’t get master address from ZooKeeper; znode data == null

Viewing 3 replies - 1 through 3 (of 3 total)

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

  • Author
  • #43913

    Enis / Peter,

    I was able to get to Hue via and was able to run Hbase shell commands…so Hbase appears up and healthy

    Went back to my java program (with the added config.set(“zookeeper.znode.parent”, “/hbase-unsecure”) in lieu of the classpath change…

    I added the line qualified name (rather than simply sandbox) to the /etc/hosts on the OSX and that did it!

    Thanks much.


    Enis Soztutar

    Hi Kieran,

    As Peter points out, you should also set the zookeeper.znode.parent property to “/hbase-unsercure”. However, the recommended practice for hbase clients is to not set the config properties, but add hbase conf dir (/etc/hbase/conf/) to classpath, and let HBaseConfiguration take care reading the necessary configuration. You can also copy the conf files from /etc/hbase/conf to your classpath as well.


    1. You need to start HBase (it’s disabled by default on Sandbox). You can do it either from hue about page ( or from ambari.
    2. You need to make dns alias in /etc/hosts to :
    3. Whether copy /etc/hbase/conf/hbase-site.xml from sandbox to your classpath or add one more setting to your code:

    config.set("zookeeper.znode.parent", "/hbase-unsecure");

Viewing 3 replies - 1 through 3 (of 3 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.