sophie
sophie

Reputation: 1039

HDP: unable to start Phoenix sqlline.py

I am using Sandbox HDP 2.2

I did a yum install phoenix (version is 4.2)

But when I run these:

./sqlline.py localhost:2181
./sqlline.py localhost
./sqlline.py sandbox.hortonworks.com:2181
./sqlline.py sandbox.hortonworks.com

I got the error:

15/07/03 08:26:31 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.

I tried to run:

./sqlline.py sandbox.hortonworks.com:2181:/hbase-unsecure

But it "hangs" - after 20 minutes still no response

I have this in my /etc/hbase/conf/hbase-site.xml:

<property>
  <name>hbase.zookeeper.quorum</name>
  <value>sandbox.hortonworks.com</value>
</property>
<property>
  <name>zookeeper.znode.parent</name>
  <value>/hbase-unsecure</value>
</property>

Upvotes: 3

Views: 3806

Answers (2)

slm
slm

Reputation: 16406

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

Upvotes: 1

Anil Gupta
Anil Gupta

Reputation: 1126

You will need to specify root dir "/hbase-unsecure" in the connection string because by default Phoenix is trying to connect to /hbase. Try this:

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

Upvotes: 0

Related Questions