Support Questions

Find answers, ask questions, and share your expertise

Phoenix and ZK connection issue

avatar
Contributor

I tried Phoenix and installed it according to the instruction, but I got the following error message:

[root@cui-hdp-02 phoenix]# sqlline.py localhost Setting property: [isolation, TRANSACTION_READ_COMMITTED] issuing: !connect jdbc:phoenix:localhost none none org.apache.phoenix.jdbc.PhoenixDriver Connecting to jdbc:phoenix:localhost

15/12/15 14:17:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

15/12/15 14:17:14 WARN impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties 15/12/15 14:17:15 ERROR client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

My hbase's znode is by default defined as /hbase-unseure. How can i change phoenix to use current znode, instead of /hbase?

1 ACCEPTED SOLUTION

avatar
Guru

You can use the sqlline like this:

sqlline.py localhost:2181:/hbase-unsecure

View solution in original post

5 REPLIES 5

avatar
Super Guru

Trying providing an argument of "localhost:2181:/hbase-unsecure" instead of "localhost"

avatar
Guru

You can use the sqlline like this:

sqlline.py localhost:2181:/hbase-unsecure

avatar
Contributor

root@cui-hdp-02 ~]# hbase version 2015-12-15 14:49:15,713 INFO [main] util.VersionInfo: HBase 1.1.2.2.3.2.0-2950

I used phoenix-4.6.0-HBase-1.1-bin.tar.gz

avatar
Contributor

[root@cui-hdp-02 phoenix]# sqlline.py localhost:2181:/hbase-unsecure Setting property: [isolation, TRANSACTION_READ_COMMITTED] issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none org.apache.phoenix.jdbc.PhoenixDriver Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure

15/12/15 14:50:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

15/12/15 14:50:42 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 4 attempts

15/12/15 14:50:42 ERROR zookeeper.ZooKeeperWatcher: hconnection-0x4034c28c0x0, quorum=localhost:2181, baseZNode=/hbase-unsecure Received unexpected KeeperException, re-throwing exception org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase-unsecure/hbaseid

avatar
Rising Star

You have to create links in the directory where `sqlline.py` lives to 2 .xml files that are provided by HBase/Hadoop.

$ pwd
/usr/hdp/2.2.8.0-3150/phoenix/bin
$ ll | grep xml
lrwxrwxrwx 1 root root   29 Dec 16 13:34 core-site.xml -> /etc/hbase/conf/core-site.xml
lrwxrwxrwx 1 root root   30 Dec 16 13:34 hbase-site.xml -> /etc/hbase/conf/hbase-site.xml 

With those in place and `$JAVA_HOME` and `java` on your `$PATH`, you can now run `sqlline.py`:

$ ./sqlline.py localhost:2181/hbase-unsecure