Home Forums Hortonworks Sandbox org.apache.hadoop.hbase.MasterNotRunningException

This topic contains 0 replies, has 1 voice, and was last updated by  Simed Mehdi 6 months, 3 weeks ago.

  • Creator
    Topic
  • #51453

    Simed Mehdi
    Participant

    I’m using the hortonworks sandbox 2.0 on Vmware on windows 8.1 . I succeeded to connect from “Talend for Big Data” to HDFS, Hive, Hcatalog and OOzie, but not to Hbase. I tested many solution found on forums, no way !! (of course, I started Hbase before, from sandbox interface )

    So tested the connection to Hbase from this java program :

    import org.apache.hadoop.conf.Configuration;
    import org.apache.hadoop.fs.Path;
    import org.apache.hadoop.hbase.HBaseConfiguration;
    import org.apache.hadoop.hbase.MasterNotRunningException;
    import org.apache.hadoop.hbase.ZooKeeperConnectionException;
    import org.apache.hadoop.hbase.client.HBaseAdmin;

    public class Test {

    public static void main(String[] args) {
    // TODO Auto-generated method stub
    Configuration config = HBaseConfiguration.create();
    config.set(“hbase.zookeeper.quorum”, “192.168.21.128”);
    config.set(“hbase.zookeeper.property.clientPort”, “2181”);
    config.set(“zookeeper.znode.parent”, “/hbase-unsecure”);
    //config.addResource(new Path(“/etc/hbase/conf/hbase-site.xml”));
    //config.set(“zookeeper.znode.parent”, “/hbase-unsecure”);
    //config.setInt(“timeout”, 120000);
    //config.set(“hbase.master”, “sandbox.hortonworks.com:60010″);
    try {
    HBaseAdmin.checkHBaseAvailable(config);
    } catch (ZooKeeperConnectionException e) {
    e.printStackTrace();
    } catch (MasterNotRunningException e) {
    e.printStackTrace();
    }

    }

    }

    and i get this error :

    avr. 11, 2014 11:02:02 AM org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation getMaster
    Infos: ZooKeeper available but no active master location found
    avr. 11, 2014 11:02:02 AM org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation getMaster
    Infos: getMaster attempt 0 of 1 failed; no more retrying.
    org.apache.hadoop.hbase.MasterNotRunningException
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:356)
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:90)
    at org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:1202)
    at Test.main(Test.java:23)

    I don’t understand why it says that Master is not running, because when i try : http://192.168.21.128:60010/master-status on my browser, i can see that the master is started.

    Please help me in this regard.

    thanks.

You must be logged in to reply to this topic.