Home Forums Hortonworks Sandbox HBase in Sandbox

Tagged: 

This topic contains 15 replies, has 3 voices, and was last updated by  Girija Duvvuri 4 months, 4 weeks ago.

  • Creator
    Topic
  • #47538

    Andrew R
    Participant

    Hello,
    It seems that HBase does not work “out of the Sandbox”

    I have installed the latest Sandbox and successfully completed all tutorials, so basically HDFS and Hive are OK in the sandbox installation.
    I am able to work with HBase in Shell. The only minor problem was the following warning:

    
    hbase shell
    status
    14/01/28 04:47:12 INFO Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Type "exit<RETURN>" to leave the 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> status
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/lib/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    

    This is not a big issue, but demonstrate some lack of testing…

    ================================
    Later I found the following show-stopper: I am not able to connect to the hbase from a Java program:
    client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found

    It is also not possible to connect with a browser to Master server (http://127.0.0.1:60010) and Region server (http://127.0.0.1:60030)
    As I can see, there is an issue with master hbase configuration, and as I am a very new to hadoop I am not able to fix it.

    Could you please give an advice or fix the Sandbox?

    PS
    By the way, in the files ‘hbase-site’ and ‘zoo.cfg’ I can see ‘sandbox.hortonworks.com’
    Are you sure it will work? Should’t it be ‘localhost’?

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #52108

    Girija Duvvuri
    Participant

    I am getting the error , while configuring the Pentaho Hbase output. I have given the following details.

    Zookeeper host(s) : sandbox.hortonworks.com
    Post : 2181

    Here is what my /etc/zookeeper/conf/zoo.cfg contains :

    # The number of milliseconds of each tick
    tickTime=2000
    # The number of ticks that the initial
    # synchronization phase can take
    initLimit=10
    # The number of ticks that can pass between
    # sending a request and getting an acknowledgement
    syncLimit=5
    # the directory where the snapshot is stored.
    dataDir=/hadoop/zookeeper
    # the port at which the clients will connect
    clientPort=2181
    server.1=sandbox.hortonworks.com:2888:3888

    Here is what my /etc/hosts contains

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    192.168.56.101 sandbox.hortonworks.com sandbox

    I tried commenting the first line(127.0.0.1 localhost.localdomain localhost) but when I restart the machine it is automatically getting un commented.

    “An error is preventing HBase from connecting to ZooKeeper”

    The exception includes:
    org.apache.hadoop.hbase.ZooKeeperConnectionException: An error is preventing HBase from connecting to ZooKeeper
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:994)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:303)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:294)

    Collapse
    #47643

    Dave
    Moderator

    Hi Andrew,

    Well they exist on the sandbox but as it runs on 127.0.0.1 then it uses port forwarding to connect (in Virtual Box) and requires some configuration changes to get the system onto your network. It can be done if you know what you’re doing with Linux administration etc, but it does move away from what the sandbox is designed for.
    The Thrift Server runs on port 9083 and you can see this is running doing a netstat – you may be able to reach this from your local machine to your VM – and potentially using your machines IP.

    Thanks

    Dave

    Collapse
    #47642

    Andrew R
    Participant

    Oh, that makes sense. May be REST server or THRIFT might solve my task (remote access, like in real life)?

    Collapse
    #47641

    Dave
    Moderator

    Hi Andrew,

    You would need to put the Sandbox onto your network (rather than running it on 127.0.0.1)
    For what you are trying to do it may be make more sense to build a single node cluster using Ambari and a VM / Physical Box which has an IP on your network.

    Thanks

    Dave

    Collapse
    #47634

    Andrew R
    Participant

    It is a pity there is no working sample java project, which would demonstrate how to connect to the Sandbox HBase installation from a remote (host) computer.

    What libs one would need to compile and connect?
    All examples demonstrate only connection to the local HBase installation.

    Collapse
    #47552

    Dave
    Moderator

    Hi Andrew,

    Where do you see the exception?

    Thanks

    Dave

    Collapse
    #47551

    Andrew R
    Participant

    And another pont: the Java program runs from the host computer (Win7), not in the SandBox.
    May it be that host computer knows nothing about ‘sandbox.hortonworks.com’ and generates an exception?

    Collapse
    #47550

    Andrew R
    Participant

    PING sandbox.hortonworks.com (10.0.2.15) 56(84) bytes of data.
    64 bytes from sandbox.hortonworks.com (10.0.2.15): icmp_seq=1 ttl=64 time=0.042 ms

    Collapse
    #47549

    Dave
    Moderator

    Hi Andrew,

    Can you ping sandbox.hortonworks.com from the sandbox itself?
    You get the exception when you try and start zookeeper?

    Thanks

    Dave

    Collapse
    #47548

    Andrew R
    Participant

    I did not change anytning…. Anyway, I started new Sandbox download, just in case.

    Here are the results:

    cat /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    10.0.2.15 sandbox.hortonworks.com sandbox

    Collapse
    #47547

    Dave
    Moderator

    Hi Andrew,

    Did you modify anything on the sandbox itself?
    Can you run:

    cat /etc/hosts

    Thanks

    Dave

    Collapse
    #47546

    Andrew R
    Participant

    All the same, and I see the following message:

    zookeeper.ZKConfig: java.net.UnknownHostException: sandbox.hortonworks.com

    Does it help?

    Collapse
    #47543

    Dave
    Moderator

    Hi Andrew,

    From Ambari have you tried restarting zookeeper?
    All the configuration is correct out of the box, so it is probably zookeeper in an odd state.

    Thanks

    Dave

    Collapse
    #47542

    Andrew R
    Participant

    Dear Dave,
    Yes, after starting ambari-server and ambari-agent, I was able to launch hbase Master server using web-interface. Thank you!

    After that I recieve the following error message from simple Java program:

    Configuration config = HBaseConfiguration.create();
    config.set("hbase.zookeeper.quorum", "sandbox.hortonworks.com");
    config.set("hbase.zookeeper.property.clientPort", "2181");
    HBaseAdmin.checkHBaseAvailable(config);


    14/01/28 18:24:36 ERROR zookeeper.ZKConfig: no valid quorum servers found in zoo.cfg
    Exception in thread "main" org.apache.hadoop.hbase.ZooKeeperConnectionException: An error is preventing HBase from connecting to ZooKeeper
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1213)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:511)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:502)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:172)
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:92)
    at org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:1320)
    at com.yujikosuga.hbase.Main.main(Main.java:69)
    Caused by: java.io.IOException: Unable to determine ZooKeeper ensemble
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.connect(ZKUtil.java:92)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:119)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1209)
    ... 6 more

    The sandbox zoo.cfg is:

    tickTime=2000
    initLimit=10
    syncLimit=5
    dataDir=/hadoop/zookeeper
    clientPort=2181
    server.1=sandbox.hortonworks.com:2888:3888

    May be you have another brilliant idea what is going on???

    Collapse
    #47541

    Dave
    Moderator

    Hi Andrew,

    The hostname should be sandbox.hortonworks.com so please do not change this to localhost as the configuration files do not like localhost being used.

    I am looking at the latest sandbox now and do not see the same issue as you.
    Can you start the ambari-server and agent (ambari-server start | ambari-agent start) and then log into 127.0.0.1:8080 admin / admin
    Have a look at the status of HBase there.

    Thanks

    Dave

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