Home Forums HBase Unable to Connect to Remote Server using Hbase

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Sasha J 2 years, 1 month ago.

  • Creator
    Topic
  • #8566

    Navya Marina
    Member

    I am very new to Hbase and Hadoop. I want to create a table in Java and communicate with my Remote Server. But it throwing me an error, I am confused with Configuration details in habse-site .xml
    java Code:
    import java.io.IOException;

    import org.apache.hadoop.conf.Configuration;
    import org.apache.hadoop.hbase.HBaseConfiguration;
    import org.apache.hadoop.hbase.client.Get;
    import org.apache.hadoop.hbase.client.HTable;
    import org.apache.hadoop.hbase.client.Put;
    import org.apache.hadoop.hbase.client.Result;
    import org.apache.hadoop.hbase.client.ResultScanner;
    import org.apache.hadoop.hbase.client.Scan;
    import org.apache.hadoop.hbase.util.Bytes;

    public class HBaseConnector {
    public static void main(String[] args) throws IOException {

    Configuration config = HBaseConfiguration.create();
    HTable table = new HTable(config, “myLittleHBaseTable”);
    Put p = new Put(Bytes.toBytes(“myLittleRow”));
    p.add(Bytes.toBytes(“myLittleFamily”), Bytes.toBytes(“someQualifier”),
    Bytes.toBytes(“Some Value”));
    table.put(p);

    Get g = new Get(Bytes.toBytes(“myLittleRow”));
    Result r = table.get(g);
    byte[] value = r.getValue(Bytes.toBytes(“myLittleFamily”), Bytes.toBytes(“someQualifier”));
    String valueStr = Bytes.toString(value);
    System.out.println(“GET: ” + valueStr);

    Scan s = new Scan();
    s.addColumn(Bytes.toBytes(“myLittleFamily”), Bytes
    .toBytes(“someQualifier”));
    ResultScanner scanner = table.getScanner(s);
    try {
    for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
    System.out.println(“Found row: ” + rr);
    }

    // The other approach is to use a foreach loop. Scanners are
    // iterable!
    // for (Result rr : scanner) {
    // System.out.println(“Found row: ” + rr);
    // }
    }
    finally
    {
    scanner.close();
    }
    }
    }

    Hbase-site.xml:

    hbase.rootdir
    hdfs://172.16.17.55:60000/hbase

    hbase.master
    172.16.17.55:60000

    hbase.cluster.distributed
    true

    hbase.zookeeper.quorum
    172.16.17.55

    hbase.zookeeper.property.clientPort
    60000

    Error:
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.5-1301095, built on 03/15/2012 19:48 GMT
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:host.name=user-8329a7141c
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_25
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jre6
    12/08/22 17:37:25 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;C:\Documents and Settings\user\Desktop\HAdoop\jars\lib\hbase-0.90.6.jar
    12/08/22 17:37:25 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 17:37:25 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:\DOCUME~1\user\LOCALS~1\Temp\
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:java.compiler=
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows XP
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:os.version=5.1
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:user.name=user
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:user.home=C:\Documents and Settings\user
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Client environment:user.dir=D:\workspace\Hbase
    12/08/22 17:37:25 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
    12/08/22 17:37:25 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:25 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 3484@user-8329a7141c
    12/08/22 17:37:26 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:26 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    12/08/22 17:37:26 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms
    12/08/22 17:37:28 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:29 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:29 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    12/08/22 17:37:29 INFO util.RetryCounter: The 2 times to retry after sleeping 4000 ms
    12/08/22 17:37:31 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:32 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:34 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:34 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:35 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    12/08/22 17:37:35 INFO util.RetryCounter: The 3 times to retry after sleeping 8000 ms
    12/08/22 17:37:36 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:37 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:38 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:39 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:41 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:42 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:44 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:45 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:45 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
    12/08/22 17:37:45 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
    12/08/22 17:37:45 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    12/08/22 17:37:45 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    12/08/22 17:37:45 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    12/08/22 17:37:46 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:47 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:47 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    12/08/22 17:37:47 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms
    12/08/22 17:37:49 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:50 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:50 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    12/08/22 17:37:50 INFO util.RetryCounter: The 2 times to retry after sleeping 4000 ms
    12/08/22 17:37:51 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:52 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:53 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:54 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:54 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    12/08/22 17:37:54 INFO util.RetryCounter: The 3 times to retry after sleeping 8000 ms
    12/08/22 17:37:56 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:56 WARN zookeeper.ClientCnxn: Session 0×0 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 17:37:58 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:37:59 WARN zookeeper.ClientCnxn: Session 0×0 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 17:38:00 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:38:01 WARN zookeeper.ClientCnxn: Session 0×0 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 17:38:03 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
    12/08/22 17:38:04 WARN zookeeper.ClientCnxn: Session 0×0 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 17:38:04 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
    12/08/22 17:38:04 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
    12/08/22 17:38:04 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    12/08/22 17:38:04 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    12/08/22 17:38:04 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.(HConnectionManager.java:569)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:194)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)
    Exception in thread “main” java.io.IOException: org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@19209ea 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.(HTable.java:213)
    at org.apache.hadoop.hbase.client.HTable.(HTable.java:171)
    at com.strat.HBaseConnector.main(HBaseConnector.java:18)

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #8631

    Sasha J
    Moderator

    Navya,
    It seems like your HBase installation trying to communicate with ZooKepper over the localhost IP on default port 2181:

    12/08/22 17:37:31 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181

    And your hbase-site.xml points to oyther IP and other port:
    hbase.zookeeper.quorum
    172.16.17.55

    hbase.zookeeper.property.clientPort
    60000

    Please, make sure, that your ZK bound to the correct address and to correct port and adjust your configuration.
    In general, ZK should not bound to “localhost”, this way it can not communicate with the external processes…

    Thank you!
    Sasha

    Collapse
Viewing 1 replies (of 1 total)