Java – Cannot connect to a remote server using Hbase

Cannot connect to a remote server using Hbase… here is a solution to the problem.

Cannot connect to a remote server using Hbase

I’m new to Hadoop and Hbase. I’m trying to create a table from java code and connect to my remote server (Hbase), which is (172.80.72.86). It is a Linux machine (172.80.72.86). I tried the above

I get the following error

12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:zookeeper.version=3.3.5-1301095, built on 03/15/2012 19:48 GMT
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:host.name=user-8329a7141c
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.version=1.6.0_25
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.home=C:\Program Files\Java\jre6
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.class.path=D:\workspace\Hbase\bin; C:\Documents and Settings\user\Desktop\HAdoop\jars\commons-cli-1.2.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\commons-logging-1.1.1.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\log4j-1.2.16.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\hbase-dsl-0.1.2-SNAPSHOT.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\commons-lang-2.5.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\commons-logging-api-1.1.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\hadoop-core-0.20.2.jar; C:\Documents and Settings\user\My Documents\Downloads\slf4j-1.6.6\slf4j-api-1.6.6.jar; C:\Documents and Settings\user\My Documents\Downloads\slf4j-1.6.6\slf4j-log4j12-1.6.6.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\hbase-0.92.1.jar; C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\zookeeper-3.3.5.jar
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.library.path=C:\Program Files\Java\jre6\bin;.; C:\WINDOWS\Sun\Java\bin; C:\WINDOWS\system32; C:\WINDOWS; C:/Program Files/Java/jre6/bin/client; C:/Program Files/Java/jre6/bin; C:\WINDOWS\system32;D:\oracle\product\10.2.0\db_1\bin; C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;D:\Pervasive Stuff\New Training stuff\datarush-6.0.0-26\bin; C:\Program Files\Java\jdk1.6.0_25\bin; C:\Program Files\grails-2.0.4\bin;.;
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.io.tmpdir=C:\DOCUME~1\user\LOCALS~1\Temp\
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:java.compiler=<NA>
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:os.name=Windows XP
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:os.arch=x86
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:os.version=5.1
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:user.name=user
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:user.home=C:\Documents and Settings\user
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Client environment:user.dir=D:\workspace\Hbase
12/08/22 14:06:49 INFO zookeeper. ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
12/08/22 14:06:50 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:50 INFO zookeeper. RecoverableZooKeeper: The identifier of this process is [email protected]
12/08/22 14:06:50 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:51 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:51 INFO util. RetryCounter: The 1 times to retry  after sleeping 2000 ms
12/08/22 14:06:52 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:53 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:53 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:53 INFO util. RetryCounter: The 2 times to retry  after sleeping 4000 ms
12/08/22 14:06:54 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:55 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:57 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:58 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:58 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:58 INFO util. RetryCounter: The 3 times to retry  after sleeping 8000 ms
12/08/22 14:07:00 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:01 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:02 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:03 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:05 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:06 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:06 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:07:06 ERROR zookeeper. RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
12/08/22 14:07:06 WARN zookeeper. ZKUtil: hconnection Unable to set watcher on znode /hbase/master
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:06 ERROR zookeeper. ZooKeeperWatcher: hconnection Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:06 FATAL client. HConnectionManager$HConnectionImplementation: Unexpected exception during initialization, aborting
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:08 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:09 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:09 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/ root-region-server
12/08/22 14:07:09 INFO util. RetryCounter: The 1 times to retry  after sleeping 2000 ms
12/08/22 14:07:10 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:11 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:11 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/ root-region-server
12/08/22 14:07:11 INFO util. RetryCounter: The 2 times to retry  after sleeping 4000 ms
12/08/22 14:07:12 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:13 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:15 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:16 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:16 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/ root-region-server
12/08/22 14:07:16 INFO util. RetryCounter: The 3 times to retry  after sleeping 8000 ms
12/08/22 14:07:18 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:19 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:20 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:21 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:23 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:24 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:25 INFO zookeeper. ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:26 WARN zookeeper. ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:26 WARN zookeeper. RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/ root-region-server
12/08/22 14:07:26 ERROR zookeeper. RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
12/08/22 14:07:26 WARN zookeeper. ZKUtil: hconnection Unable to set watcher on znode /hbase/root-region-server
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:26 ERROR zookeeper. ZooKeeperWatcher: hconnection Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:26 FATAL client. HConnectionManager$HConnectionImplementation: Unexpected exception during initialization, aborting
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)
Exception in thread "main" java.io.IOException: org.apache.h[email protected]b61fd1 closed
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:794)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:782)
    at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:249)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:213)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
    at HBaseConnector.main(HBaseConnector.java:20)

Solution

Specify the zookeeper IP and continue. The client PC must know where zookeeper is running.

Add the following line next to the program’s configuration.

config.set("hbase.zookeeper.quorum", "172.80.72.86");   Your remote Pc where the zookeeper is running. Mention the port if needed." 172.80.72.86:60020"

Related Problems and Solutions