Unable to Perform any HBase operation in lab using java clinet

Unable to Perform any HBase operation in lab using java clinet
0.0 0


Hi @itversity , @viswanath.raju ,
I am getting an error while performing operation in hbase using java client from remote machine.

referred this tutorial https://www.youtube.com/watch?v=aiJrgpFXXI4&t=256s
to build sample app, but I am unable to make it successful.

I found many very similar question in this forum, but none of them are answered.so creating new question.
I can make connection to the cluster, by executing the command
$ nc -vt nn01.itversity.com 2181 and all other nodes as well.

other info below … Requesting your time to resolve this issue.

Configuration param

  Configuration config = HBaseConfiguration.create();
	config.set("hbase.zookeeper.quorum", "nn01.itversity.com,nn02.itversity.com,rm01.itversity.com");
	config.set("hbase.zookeeper.property.clientPort", "2181");
	config.set("zookeeper.znode.parent", "/hbase-unsecure");
	config.set("hbase.cluster.distributed", "true");


  connection = ConnectionFactory.createConnection(config);
  admin = connection.getAdmin();
   tableAvailable = admin.isTableAvailable(TableName.valueOf("gobi_test_table"));

org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Fri Oct 06 14:13:16 IST 2017, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=60531: row ‘gobi_test_table,00000000000000’ on table ‘hbase:meta’ at region=hbase:meta,1.1588230740, hostname=wn03.itversity.com,16020,1500458929354, seqNum=0

tableAvailable = false
	at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:271)
	at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:195)
	at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:59)
	at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
	at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:320)
	at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:295)
	at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:160)
	at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:155)
	at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:821)
	at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:193)
	at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:89)
	at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.isTableAvailable(ConnectionManager.java:985)
	at org.apache.hadoop.hbase.client.HBaseAdmin.isTableAvailable(HBaseAdmin.java:1399)
	at com.sailabs.hbase.CreateTable.main(CreateTable.java:63)
Caused by: java.net.SocketTimeoutException: callTimeout=60000, callDuration=60531: row 'gobi_test_table,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=wn03.itversity.com,16020,1500458929354, seqNum=0
	at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:159)
	at org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture.run(ResultBoundedCompletionService.java:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
	at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
	at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
	at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupConnection(RpcClientImpl.java:424)
	at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupIOstreams(RpcClientImpl.java:748)
	at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.writeRequest(RpcClientImpl.java:920)
	at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.tracedWriteRequest(RpcClientImpl.java:889)
	at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1222)
	at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:213)
	at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:287)
	at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.scan(ClientProtos.java:32651)
	at org.apache.hadoop.hbase.client.ScannerCallable.openScanner(ScannerCallable.java:372)
	at org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:199)
	at org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:62)
	at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
	at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:346)
	at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:320)
	at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:126)
	... 4 more


Hello @itversity ,

Requesting you to look this issue and update



Can you share the complete java program?


It is working fine for us. Probably you might be using your office laptop and firewalls might be blocking 2181 port.

PS: I have tested the code by importing in eclipse.

@BaLu_SaI, @vinodnerella - we miss this topic for 3 days. We need to be lot more responsive with issues related to our platform. If you cannot fix the issues, please bring them to my notice.


Hi Team,

I am using this lab to try end to end scenario. ie ( data will be generated from my local machine and processed in Lab cluster and stored in different remote machine ( mysql in AWS or other ) ). I am facing connection issues when I try to connect to lab from my personal machine. of course, it is open , and No firewall. Also, kindly suggest some way to check connection issue.
I am running below command to confirm that , I am able to connect
nc -vt nn01.itversity.com 2181

btw, did you modify any code which I have sent to you by mail. or it is connecting to cluster once it started running.

Is this because of, missing something from my end or you are executing code as privileged user ?


no changes made to the code. It ran as is. I will share the screenshots
–Durga Gadiraju


Well, then what could be the problem?
I dont think my machine is behind firewall as I am using personal laptop…

What is the next step to solve this issue?

one suggestion , can you please try the same thing using some subscriber credential.also, please take a short video of execution of above program ( starting from importing project till the connecting to the cluster ).


@itversity , @BaLu_SaI ,
Is this topic concluded or working on it ?


Hi @gobi Please check your mail for the update. It is running fine for me too. Please check the screenshot below.

Hbase connecting using java client


Hi @vinodnerella , @itversity , @BaLu_SaI ,
kindly close this issue by EOD .

@vinodnerella , let me know, if you need any assistance from my end to close this issue.


Can you please test the latest jar file with dependency jars and let me know whats happening?

Here is the link for jar file:


@vinodnerella ,
Sure , i’ll check and let you know.
however, provided solution is a work around. In real time scenario, uploading jar is not a solution. Requesting you to invest time on the actual issue rather spending time on uploading jar solution.

Big thanks to you for spending time on this. If required, will sync up at 5 PM today.



@vinodnerella , @BaLu_SaI , @itversity

Any update on this?


Hi Gobi,

As of now running the jar file is the solution. Connecting to labs, since there is port connection issues, it will take some more time to resolve this issue. Till then, we request to you go with this work around solution.

We are tracking this issue, we will update the required solution is provided.



@Vinod, Thanks for the update.

Expecting it will be resolved in week time.
and, while testing this issue , kindly test the simple kafka producer also (from client machine).



@vinodnerella , @itversity

any update on this ?


As of now, it is not working outside the lab.

You have to test locally and then deploy the jar on to the lab and run it.