Support Questions
Find answers, ask questions, and share your expertise

Not able to connect to HBase. Zookeeper Error

New Contributor

HI,

I am trying to connect to HBase in a HDP sandbox environment from a Java client in Eclipse. Have brought up the HBase from Ambari. But getting the below error.

2016-03-19 10:20:48.182 WARN 10236 --- [ main] o.s.d.h.h.HbaseConfigurationFactoryBean : Use of 'stopProxy' has been deprecated 2016-03-19 10:20:54.293 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2016-03-19 10:20:54.294 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:host.name=home-pc 2016-03-19 10:20:54.295 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.version=1.8.0_74 2016-03-19 10:20:54.295 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.vendor=Oracle Corporation 2016-03-19 10:20:54.295 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.home=C:\Program Files\Java\jre1.8.0_74 2016-03-19 2016-03-19 10:20:54.302 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.library.path=C:\Training\HDP\hadoop-common-2.2.0-bin-master\bin 2016-03-19 10:20:54.302 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=C:\Users\Ravi\AppData\Local\Temp\ 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.compiler=<NA> 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.name=Windows 10 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.version=10.0 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.name=Ravi 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.home=C:\Users\Ravi 2016-03-19 10:20:54.303 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.dir=C:\Users\Ravi\workspace\gs-rest-service-initial 2016-03-19 10:20:54.305 INFO 10236 --- [ main] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=sandbox.hortonworks.com:2181 sessionTimeout=60000 watcher=hconnection-0xaa10649, quorum=sandbox.hortonworks.com:2181, baseZNode=/hbase-unsecure 2016-03-19 10:20:57.469 INFO 10236 --- [ main] o.a.h.h.zookeeper.RecoverableZooKeeper : Process identifier=hconnection-0xaa10649 connecting to ZooKeeper ensemble=sandbox.hortonworks.com:2181 2016-03-19 10:21:02.006 INFO 10236 --- [42.140.21:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 92.242.140.21/92.242.140.21:2181. Will not attempt to authenticate using SASL (unknown error) 2016-03-19 10:21:23.039 WARN 10236 --- [42.140.21:2181)] org.apache.zookeeper.ClientCnxn : Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection timed out: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74] at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.8.0_74] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) ~[zookeeper-3.4.6.jar:3.4.6-1569965] 2016-03-19 10:21:23.186 WARN 10236 --- [ main] o.a.h.h.zookeeper.RecoverableZooKeeper : Possibly transient ZooKeeper, quorum=sandbox.hortonworks.com:2181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase-unsecure/hbaseid 2016-03-19 10:21:23.187 INFO 10236 --- [ main] o.apache.hadoop.hbase.util.RetryCounter : Sleeping 1000ms before retry #0... 2016-03-19 10:21:24.157 INFO 10236 --- [42.140.21:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 92.242.140.21/92.242.140.21:2181. Will not attempt to authenticate using SASL (unknown error) 2016-03-19 10:21:45.161 WARN 10236 --- [42.140.21:2181)] org.apache.zookeeper.ClientCnxn : Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection timed out: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74] at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.8.0_74] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.6.jar:3.4.6-1569965] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) ~[zookeeper-3.4.6.jar:3.4.6-1569965] 2016-03-19 10:21:45.268 WARN 10236 --- [ main] o.a.h.h.zookeeper.RecoverableZooKeeper : Possibly transient ZooKeeper, quorum=sandbox.hortonworks.com:2181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase-unsecure/hbaseid 2016-03-19 10:21:45.269 INFO 10236 --- [ main] o.apache.hadoop.hbase.util.RetryCounter : Sleeping 2000ms before retry #1... 2016-03-19 10:21:46.268 INFO 10236 --- [42.140.21:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 92.242.140.21/92.242.140.21:2181. Will not attempt to authenticate using SASL (unknown error)

I have restarted the HBase from Ambari. But no luck.

Running out of ideas. Please help.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Not able to connect to HBase. Zookeeper Error

Mentor

You need to port forward port 2181.

View solution in original post

7 REPLIES 7

Re: Not able to connect to HBase. Zookeeper Error

Mentor

You need to port forward port 2181.

View solution in original post

Re: Not able to connect to HBase. Zookeeper Error

New Contributor

Do I need to do port forwarding even if my sandbox is running on my local laptop from which I am running my eclipse based java client as well.

Re: Not able to connect to HBase. Zookeeper Error

Mentor

In your network adapter properties, make sure allow all is enabled for 2nd adapter. Once that's set, make sure there's no firewall blocking traffic. As last resort, make sure port forward of zk port is enabled.

Re: Not able to connect to HBase. Zookeeper Error

New Contributor

The port forwarding worked. Thank you for the tip.

Re: Not able to connect to HBase. Zookeeper Error

New Contributor

As part of the sandbox install, I see lot of other ports forwarded that are relevant to the hadoop installation. Any reason why the 2181 is not part of that list.

Re: Not able to connect to HBase. Zookeeper Error

Mentor

My only guess is that your use case is more advanced than other users'. I will raise this question with the team. @rcoss @rmolina

Re: Not able to connect to HBase. Zookeeper Error

Rising Star

@Ravi Malayambakkam, @Rafael Coss, @Artem Ervits,

That zookeeper port forward was just missed, I've added it to our build code and will be available in our next release.

Thanks for notifying us!