4

I simply cannot connect my client machine to HBase.

Client is running on Windows 8. HBase on Fedora VM.

I've imported the following jars:

commons-configuration (commons-configuration-1.6.jar)

commons-lang (commons-lang-2.6.jar)

commons-logging (commons-logging-1.1.1.jar)

hadoop-core (hadoop-core-1.2.1.jar)

hbase (hbase-0.94.11.jar)

log4j (log4j-1.2.16.jar)

protobuf-java-2.5.0.jar

slf4j-api (slf4j-api-1.5.8.jar)

slf4j-log4j (slf4j-log4j12-1.5.8.jar)

zookeeper (zookeeper-3.4.3.jar)

I've looked here: Hbase client do not able to connect with remote Hbase server (I'm even using question's code from there) didn't help.

I've looked here: https://www.mail-archive.com/user@hbase.apache.org/msg23159.html didn't help.

I've edited my /etc/hosts to contain "my_ip localhost".

I have included this in both client side and server side hdfs-site.xml:

<property>   
        <name>hbase.rootdir</name>
        <value>file:///home/hadoop/hbase</value>
    </property> 
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/hadoop/zookeeper</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>Hadoop</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>
    <property>
        <name>hbase.master</name>
        <value>Hadoop:60000</value>
    </property>
    <property>
        <name>zookeeper.znode.rootserver</name>
        <value>Hadoop</value>
    </property>
    <property>
        <name>zookeeper.znode.parent</name>
        <value>/hbase</value>
    </property>

Everything seems fine except it hangs with this: INFO zookeeper.ClientCnxn: Session establishment complete on server ip/ip:2181, sessionid = 0x147d515db130006, negotiated timeout = 40000

Community
  • 1
  • 1
Ree
  • 863
  • 2
  • 18
  • 38

5 Answers5

1

We faced with same case at hbase .96. Our client were hanging at the same point. We replaced hbase .96 jars with hbase.98 jars. And problem solved interestingly. It is not an answer to your question but may help.

ozhang
  • 171
  • 9
1

It's been a while since this question was posted.

I had exactly the same problem, and it can have 2 origins:

  • either you misconfigured your IPs (detailed by Christian Wirth)

  • or you have a compatibility problem between the jar you use and the version of hbase you are running.

I used Cloudera to install a parcel with Hadoop/Hbase, so I add the JARs from /opt/cloudera/parcels and it works.

Hope it will help some

Whitefret
  • 1,057
  • 1
  • 10
  • 21
0

Dee , what ozhang mentioned makes sense. This is not error,it says we are able to connect with Zookeeper Successfully. This is versioning issue. My scenario is the same.I have the version 0.98.0.2.1.5.0-695-hadoop2 in server. And I tried hbase jar versions 0.96,0.98.9 , 0.98.13 .. But It did not work.Then I tried version hbase with 0.98.5-hadoop2 and it worked.Thanks!

I used the following links :

[Helpful links][1]http://www.informit.com/articles/article.aspx?p=2255108&seqNum=2

[Info][1]www.tech.theplayhub.com/java_-_hbase_client_stuck_on_session_establishment_complete/

Govind
  • 419
  • 8
  • 25
0

I was having the same problem and solved it today. Use the IPs, not the computernames. The problems seems to be that the names are not resolved properly. Using the IPs solved the issue for me.

Have a look at: Hbase managed zookeeper suddenly trying to connect to localhost instead of zookeeper quorum for further information.

Community
  • 1
  • 1
Christian Wirth
  • 123
  • 1
  • 9
0

I modified my dependency

        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>${hadoop.version}</version>
        </dependency>

to

        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>**hadoop-client**</artifactId>
            <version>${hadoop.version}</version>
        </dependency>

Where ${hadoop.version} is 2.5.1, this is the same as /opt/hbase-1.1.2/lib/hadoop-client-2.5.1.jar

Alexis Gamarra
  • 4,362
  • 1
  • 33
  • 23