Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Who agreed with this topic

Error when connect to Hbase Cluster Using Java Client: Can't get the locations

New Contributor

My hbase cluster have 1 master & 2 regional servers (running in fully distributed mode). I am able to connect & create table using hbase shell.

However, when using java client connect to the cluster, I got below error:

 

6:20:10 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:host.name=master
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_51
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/java/jdk1.7.0_51/jre
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/usr/local/apache-maven/boot/plexus-classworlds-2.4.jar
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.32-504.el6.x86_64
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:user.name=steven.tran
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/JOBST/steven.tran
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/JOBST/steven.tran/asas
15/09/20 16:20:10 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=10.10.40.17:2181 sessionTimeout=90000 watcher=hconnection-0xa92b535, quorum=10.10.40.17:2181, baseZNode=/hbase
15/09/20 16:20:10 INFO zookeeper.ClientCnxn: Opening socket connection to server 10.10.40.17/10.10.40.17:2181. Will not attempt to authenticate using SASL (unknown error)
15/09/20 16:20:10 INFO zookeeper.ClientCnxn: Socket connection established to 10.10.40.17/10.10.40.17:2181, initiating session
15/09/20 16:20:10 INFO zookeeper.ClientCnxn: Session establishment complete on server 10.10.40.17/10.10.40.17:2181, sessionid = 0x14fdfa7a8ec003a, negotiated timeout = 40000
Creating table. 15/09/20 16:21:11 INFO client.ConnectionManager$HConnectionImplementation: Closing zookeeper sessionid=0x14fdfa7a8ec003a
15/09/20 16:21:11 INFO zookeeper.ZooKeeper: Session: 0x14fdfa7a8ec003a closed
15/09/20 16:21:11 INFO zookeeper.ClientCnxn: EventThread shut down
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:307)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:131)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:56)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:287)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:267)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:139)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:134)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:825)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:606)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:370)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:281)
at HbaseTest.createOrOverwrite(HbaseTest.java:22)
at HbaseTest.createSchemaTables(HbaseTest.java:37)
at HbaseTest.main(HbaseTest.java:45)

 

According to the log, it seem that the java client successfully connected to the zookeeper. Kindly seeking your help.

Who agreed with this topic