3

I enabled Phoenix for HBase on the HDP server. But, if I try to enable sqlline by using the below command:

./sqlline.py localhost:2181:/hbase_unsecure

It encounters an error:

Error: org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the location for replica 0 (state=,code=0)

I have checked the status of zookeeper and it is running on localhost:2181

[root@sandbox-hdp bin]# echo srvr |nc localhost 2181
Zookeeper version: 3.4.6-292--1, built on 05/11/2018 07:15 GMT
Latency min/avg/max: 0/0/634
Received: 16936
Sent: 16966
Connections: 11
Outstanding: 0
Zxid: 0x46c
Mode: standalone
Node count: 276

How do I debug this so that I can run phoenix over HBase ?

ForeverLearner
  • 1,901
  • 2
  • 28
  • 51

1 Answers1

0

It means connection to HBase via zookeeper is not setup correctly.

First ssh to master node and check if direct connection from Phoenix is working using: /usr/lib/phoenix/bin/sqlline-thin.py http://localhost:8765/hbase_unsecure

Then, to connect via zookeeper: /usr/lib/phoenix/bin/sqlline.py http://master-private-dns:2181/hbase_unsecure

And using jdbc: jdbc:phoenix:master-private-dns:2181/hbase-unsecure

P. S. Tested on aws-emr, but hdp should be similar.

Lavesh
  • 169
  • 7