Home Forums HBase HBase session not established: Infamous zookeeper.znode.parent ERROR

Tagged: ,

This topic contains 7 replies, has 4 voices, and was last updated by  John Brinnand 1 month, 1 week ago.

  • Creator
    Topic
  • #32799

    John Brinnand
    Participant

    Hi All,

    Here is the error we are seeing when trying to run a Java client from a web service on a name node:

    13/08/20 23:15:30 INFO zookeeper.ZooKeeper: Session: 0x13f9c990eef011d closed
    13/08/20 23:15:30 INFO zookeeper.ClientCnxn: EventThread shut down
    13/08/20 23:15:32 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=srwd00hnm401.stubcorp.dev:2181 sessionTimeout=180000 watcher=hconnection
    13/08/20 23:15:32 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 32144@srwd00hnm401.stubcorp.dev
    13/08/20 23:15:32 INFO zookeeper.ClientCnxn: Opening socket connection to server srwd00hnm401.stubcorp.dev/10.80.14.141:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
    13/08/20 23:15:32 INFO zookeeper.ClientCnxn: Socket connection established to srwd00hnm401.stubcorp.dev/10.80.14.141:2181, initiating session
    13/08/20 23:15:32 INFO zookeeper.ClientCnxn: Session establishment complete on server srwd00hnm401.stubcorp.dev/10.80.14.141:2181, sessionid = 0x13f9c990eef011e, negotiated timeout = 40000

    13/08/20 23:15:32 ERROR client.HConnectionManager$HConnectionImplementation: Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
    13/08/20 23:15:32 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13f9c990eef011e
    13/08/20 23:15:32 INFO zookeeper.ZooKeeper: Session: 0x13f9c990eef011e closed

    13/08/20 23:15:32 INFO zookeeper.ClientCnxn: EventThread shut down

    We have not changed the default configuration that comes with the distribution. Ambari (and the command line) indicate that the Master node is up and running. HBase shell works and a table can be created successfully.

    What could be the problem here?

    Thanks,

    John

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #50068

    John Brinnand
    Participant

    Praphulla,

    The configuration parameters were put into a java HBaseClient. So when the client was initialized, the appropriate parameters were added to the configuration which is added to the HBaseAdmin. Then you can perform operations like, create HBaseAdmin#createTable(…); Please see my previous post. The code is run from a Java Class which contains the methods to build the configuration, add it to the HBaseAdmin and perform the necessary operations:

    // Configure
    Configuration config = HBaseConfiguration.create();
    config.setInt(“timeout”, this.hbaseConnectionTimeout);
    config.set(“hbase.master”, this.hbaseMasterDnsName + “:” + this.hbaseMasterPort);
    config.set(“zookeeper.znode.parent”, this.zookeeperZnodeParent);
    config.set(“hbase.zookeeper.quorum”, this.hbaseZookeeperQuroum);
    config.set(“hbase.zookeeper.property.clientPort”, this.hbaseZookeeperPropertyClientPort);

    // Use the configuration
    HBaseAdmin hba = new HBaseAdmin(config);

    // Set up the table descriptor
    HTableDescriptor ht = new HTableDescriptor(“myTableName “);
    tabledescriptor.addFamily(new HColumnDescriptor (“myCFName”));

    HTable table = new HTable(config, tableName);
    ….
    ***********************************************************************************************************************************
    The values of these variables is injected by Spring using these properties from an application-.properties file:
    hbase.connection.timeout=12000
    hbase.master.dns.name=
    hbase.master.port=60000
    hbase.zookeeper.quorum=
    hbase.zookeeper.property.clientPort=2181
    zookeeper.znode.parent=/hbase-unsecure

    I hope this helps.

    Collapse
    #50062

    Koelli Mungee
    Moderator

    Hi Praphulla,

    You would need to set zookeeper.znode.parent to /hbase-unsecure on your client side. Let me know if this helps,

    Regards
    Koelli

    Collapse
    #49513

    Praphulla Rayala
    Participant

    Hi John,

    Thanks for the solution.

    I’m new to HDP, Im using HDP2 and TITAN graph database to load the data in to HBASE. I’m also facing the same error, When I’m trying to load the graph data via gremlin.Will you please help me where can i update the configuration you suggested ?

    Regards,
    Praphulla

    Collapse
    #33010

    John Brinnand
    Participant

    Thanks for the info. It validates what we discovered the hard way. Maybe I missed, it but documentation would have been really helpful.

    John

    Collapse
    #32948

    abdelrahman
    Moderator

    Hi John,

    The default zookeeper parent node is /hbase in the Zookeepr client jar. Since this configuration is in hbase-site.xml with a value of /hbase-unsecure, it is going to work only if zookeeper parent node configuration is added to the client. Hope this helps.

    Thanks
    -Abdelrahman

    Collapse
    #32939

    John Brinnand
    Participant

    Sorry the angle brackets removed the dns name:

    application-.properties file:
    hbase.connection.timeout=12000
    hbase.master.dns.name=my.hbase.server.dns.name
    hbase.master.port=60000
    hbase.zookeeper.quorum=my.zookeeper.server.dns.name
    hbase.zookeeper.property.clientPort=2181
    zookeeper.znode.parent=/hbase-unsecure

    Collapse
    #32937

    John Brinnand
    Participant

    Hi Folks,

    I stumbled on the solution by adding the zookeeper.znode.parent to the HBaseClient. Here is the configuration

    String tablName = “userTable1″;

    Configuration config = HBaseConfiguration.create();
    config.setInt(“timeout”, this.hbaseConnectionTimeout);
    config.set(“hbase.master”, this.hbaseMasterDnsName + “:” + this.hbaseMasterPort);
    config.set(“zookeeper.znode.parent”, this.zookeeperZnodeParent);
    config.set(“hbase.zookeeper.quorum”, this.hbaseZookeeperQuroum);
    config.set(“hbase.zookeeper.property.clientPort”, this.hbaseZookeeperPropertyClientPort);

    HTable table = new HTable(config, tableName);

    The values of these variables is injected by Spring using these properties from an application-.properties file:
    hbase.connection.timeout=12000
    hbase.master.dns.name=
    hbase.master.port=60000
    hbase.zookeeper.quorum=
    hbase.zookeeper.property.clientPort=2181
    zookeeper.znode.parent=/hbase-unsecure

    And once the Java HBaseClient has the zookeeper.znode.parent, everything works! Note that this works for the sandbox as well.

    Perhaps I missed something but this is not mentioned in any document that I found. It would be really helpful to point us to the code or the documentation containing the recommended approach to use.

    Thanks,

    John

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