Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Phoenix and ZK connection issue

Solved Go to solution

Phoenix and ZK connection issue

New 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

Accepted Solutions

Re: Phoenix and ZK connection issue

Guru

You can use the sqlline like this:

sqlline.py localhost:2181:/hbase-unsecure
5 REPLIES 5

Re: Phoenix and ZK connection issue

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

Re: Phoenix and ZK connection issue

Guru

You can use the sqlline like this:

sqlline.py localhost:2181:/hbase-unsecure

Re: Phoenix and ZK connection issue

New 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

Re: Phoenix and ZK connection issue

New 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

Highlighted

Re: Phoenix and ZK connection issue

Contributor

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
Don't have an account?
Coming from Hortonworks? Activate your account here