Home Forums Hortonworks Sandbox ZooKeeper available but no active master location found

Tagged: 

This topic contains 11 replies, has 7 voices, and was last updated by  Margus Roo 5 months, 3 weeks ago.

  • Creator
    Topic
  • #16240

    Hi all,
    I am a new developer of hadoop and at the moment I fighting against an issue in hbase.
    Actually I wrote a mapreduce that should be able also to write data in hbase directly.
    Unlucky with my installation on my virtual machine I get the following error:

    INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
    13/02/28 14:27:23
    INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 1 of 10 failed; retrying after sleep of 1008
    org.apache.hadoop.hbase.MasterNotRunningException

    Are you able to provide me some useful hints?
    Thanks a lot in advance for your help

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #51350

    Margus Roo
    Participant

    Hi

    I have the same problem
    Installed last last Hortonworks virtualbox package.

    Via GUI(hue) I can use all services.
    Via shell I all works fine:
    [hbase@sandbox twitbase-master]$ hbase shell

    Version 0.96.0.2.0.6.0-76-hadoop2, re6d7a56f72914d01e55c0478d74e5cfd3778f231, Thu Oct 17 18:15:20 PDT 2013

    hbase(main):001:0> list

    ambarismoketest
    mytable
    simple_hcat_load_table
    users
    weblogs
    5 row(s) in 5.0190 seconds

    => ["ambarismoketest", "mytable", "simple_hcat_load_table", "users", "weblogs"]
    hbase(main):002:0>

    But If I exec java code I wil get:

    14/04/05 03:09:11 INFO zookeeper.ClientCnxn: Session establishment complete on server sandbox.hortonworks.com/10.0.2.15:2181, sessionid = 0x1453145e9500010, negotiated timeout = 40000
    14/04/05 03:09:11 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found

    at HBaseIA.TwitBase.InitTables.main(InitTables.java:19)

    Line in InitTables.java:19

    Configuration conf = HBaseConfiguration.create();
    conf.set(“hbase.zookeeper.quorum”, “10.0.2.15″);
    HBaseAdmin admin = new HBaseAdmin(conf); <- Line 19

    cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    10.0.2.15 sandbox.hortonworks.com sandbox

    [root@sandbox ~]# netstat -lnp | grep 2181
    tcp 0 0 0.0.0.0:2181 0.0.0.0:* LISTEN 19359/java

    [root@sandbox ~]# netstat -lnp | grep 60000
    tcp 0 0 10.0.2.15:60000 0.0.0.0:* LISTEN 20924/java

    Any hints?

    Collapse
    #39437

    Can you post your /etc/hosts??
    If you are using ubuntu, please comment 127.0.1.1 and restart

    Collapse
    #27865

    tedr
    Moderator

    Hi Thejas,

    Thanks for letting us know you have it working now.

    Ted.

    Collapse
    #27808

    Sasha thanks for the help, I got it working, the problem was namenode and root.dir was not the same among other things.

    Thanks a bunch never the less

    Collapse
    #27809

    Sasha thanks for the help, I got it working, the problem was namenode and root.dir was not the same among other things.

    Thanks a bunch never the less

    Collapse
    #27766

    Sasha J
    Moderator

    Hi Thejas,
    in order to have HBase running, you should have ZooKeeper start before HBase started.
    Make sure your ZK server is running, then start HBase processes.

    Thank you!
    Sasha

    Collapse
    #27754

    Hello larry I am having having a similar error,
    When I start-hbase,sh Hmaster is not running? why is that?
    jps command says Hmaster is not started

    it is quite annoying,
    Any help would be great

    Collapse
    #16247

    Larry Liu
    Moderator

    Can you please verify if your zookeeper is running? If your zookeeper is not running, hbase master can be started.

    Larry

    Collapse
    #16245

    Actually Itried to execute start-hbase.sh to start HMaster and after that I got the following output:
    32110 HRegionServer
    2130 HMaster
    2429 Jps
    31728 HQuorumPeer

    However after executing:

    hbase shell
    status

    it gives the same error and if I use again jps command the HMaster disappeared.

    Thanks a lot

    Collapse
    #16244

    Hi Larry,
    this is the output of the command you suggested me:

    [root@localhost ~]# $JAVA_HOME/bin/jps
    32110 HRegionServer
    32445 Jps
    31728 HQuorumPeer

    What could I do to start the HMaster. Consider that I running hadoop in standalone mode.
    Thanks a lot

    Collapse
    #16242

    Larry Liu
    Moderator

    Hi, Raffaello

    The error is self explained. org.apache.hadoop.hbase.MasterNotRunningException

    Please try to run jps to see if hmaster is running on your hbase master machine.

    Here is the jps:
    $JAVA_HOME/bin/jps

    Thanks

    Larry

    Collapse
Viewing 11 replies - 1 through 11 (of 11 total)