3

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>
sophie
  • 991
  • 2
  • 15
  • 34

2 Answers2

1

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
slm
  • 15,396
  • 12
  • 109
  • 124
0

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

Anil Gupta
  • 1,116
  • 2
  • 8
  • 13
  • 1
    I already tried it but it "hangs" - after 20 minutes there's still no response – sophie Jul 05 '15 at 10:00
  • @sophie: Are you sure that HBase is running? Also, make sure hbase-site.xml is present in path of sqlline.py application. Also, you should reduce timeouts in HBase so that it failfast.Refer to this blog: http://hadoop-hbase.blogspot.com/2012/09/hbase-client-timeouts.html – Anil Gupta Jul 05 '15 at 16:18