Support Questions
Find answers, ask questions, and share your expertise

Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled,Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enable

New Contributor

HI,

I am using HDP 2.5, Phoenix 4.7, SQuirreL 3.7.

When I tried connect to hbase using SQuirrel i got this error;

java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: ERROR 726 (43M10): Inconsistent namespace mapping properites.. Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

I never got this error before add "phoenix.schema.isNamespaceMappingEnabled=true" property on hbase-site.xml.

But when I tried connect from local server using command ./sqlline.py localhost:2181:/hbase-unsecure, I got no promblem.

Any ideas?

Thanks.

1 ACCEPTED SOLUTION

I don't know the best way to include hbase-site.xml in squirrel classpath , but people have tried by putting hbase-site.xml in phoenix-client.jar and it seems work for them.

https://distcp.quora.com/Connect-and-query-Apache-Phoenix-with-Squirrel-from-Windows

https://mail-archives.apache.org/mod_mbox/phoenix-user/201409.mbox/%3CCAF1+Vs8TMeSeUUWS-b7FYkqNgxdrL...

View solution in original post

10 REPLIES 10

Expert Contributor

Since you have "phoenix.schema.mapSystemTablesToNamespace" set on the server end, your cliemt i.e squirrel client needs to have the same config updated. To do that , you will need to add the hbase conf dir in 'Extra Class Path' tab on Squirrel .

Ensure that hbase-site.xml that located in "hbase conf dir" in the 'Extra Class Path' has the property updated as below:

<property>
<name>phoenix.schema.isNamespaceMappingEnabled</name> 
<value>true</value> 
</property> 

New Contributor

Squirrel already have hbase conf;

10952-conf.png

10953-conf2.png

Thanks.

You have mentioned HDP version 2.4.2 and Phoenix Version as 4.7

But HDP 2.4.2 supports Phoenix version 4.4? Can you check the versions properly. You can upgrade to HDP 2.5 to use Name space feature supported. then things should work properly.

New Contributor

sorry, my bad. I am using HDP-2.5, Ambari version 2.4.2.

is hbase conf must be include at the first time I make connection to phoenix?

Because now I am getting the same error even though I am rolling back my configuration before adding phoenix.schema.isNamespaceMappingEnabled=true

After rolling back the configurations have you restarted the server?

These properties(phoenix.schema.isNamespaceMappingEnabled & phoenix.schema.mapSystemTablesToNamespace) should not be rolledback.

https://phoenix.apache.org/namspace_mapping.html

I don't know the best way to include hbase-site.xml in squirrel classpath , but people have tried by putting hbase-site.xml in phoenix-client.jar and it seems work for them.

https://distcp.quora.com/Connect-and-query-Apache-Phoenix-with-Squirrel-from-Windows

https://mail-archives.apache.org/mod_mbox/phoenix-user/201409.mbox/%3CCAF1+Vs8TMeSeUUWS-b7FYkqNgxdrL...

New Contributor

Thank you for the solution, it's working!

I update the jar client using this command; jar uf phoenix-4.7.0.2.5.3.0-37-client.jar hbase-site.xml

it seems squirrel can't read the extra class path.

and thanks everyone for all your help!

Expert Contributor

Can we re-update the phoenix client jar here in the Squirrel and then try it again ?

@Roni

I was facing same kind of issue. I have resolve this issue by using following steps:-

1) Edit Ambari->Hive->Configs->Advanced->Custom hive-site->Add Property..., add the following properties based on your HBase configurations(you can search in Ambari->HBase->Configs): custom hive-site.xml

hbase.zookeeper.quorum=xyz (find this property value from hbase )

zookeeper.znode.parent=/hbase-unsecure (find this property value from hbase )

phoenix.schema.mapSystemTablesToNamespace=true

phoenix.schema.isNamespaceMappingEnabled=true

2) Copy jar to /usr/hdp/current/hive-server2/auxlib from

/usr/hdp/2.5.6.0-40/phoenix/phoenix-4.7.0.2.5.6.0-40-hive.jar

/usr/hdp/2.5.6.0-40/phoenix/phoenix-hive-4.7.0.2.5.6.0-40-sources.jar If he jar is not working for you then just try to get following jar phoenix-hive-4.7.0.2.5.3.0-37.jar and copy this to /usr/hdp/current/hive-server2/auxlib

3) add property to custom-hive-env

HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-server2/auxlib/4) Add follwoing property to custom-hbase-site.xmlphoenix.schema.mapSystemTablesToNamespace=true phoenix.schema.isNamespaceMappingEnabled=true

5) Also run following command

1) jar uf /usr/hdp/current/hive-server2/auxlib/phoenix-4.7.0.2.5.6.0-40-client.jar /etc/hive/conf/hive-site.xml

2) jar uf /usr/hdp/current/hive-server2/auxlib/phoenix-4.7.0.2.5.6.0-40-client.jar /etc/hbase/conf/hbase-site.xml

And I hope my solution will work for you 🙂

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.