Support Questions

Find answers, ask questions, and share your expertise

Getting error when trying to connect to Phoenix from SQuirrel Client

avatar
Explorer

Hi Friends,

I am not able to connect to the Phoenix from SQuirrel Client.

Versions used:

HDP 2.5.3.0, phoenix-4.7.0.2.5.3.0-37, Hbase 1.1.2, SQuirrel Client version 3.8.1

I have created 3 node cluster using Ambari Installation (ambari - 2.5.1) on AWS EC2 Instance. I am able to access the Phoenix layer by using sqlline.py.

I have followed the below link to configure SQuirrel.

https://community.hortonworks.com/articles/44350/setting-up-squirrel-and-phoenix-integration.html

I am able to create the Phoenix driver and alias successfully but when I try to connect (I am not using any userid or password) it gives me below error:

--------------------------------------------------------------------------------------------------------------------------------------------------

java.lang.NullPointerException at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.getMetaReplicaNodes(ZooKeeperWatcher.java:395) at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:562) at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61) at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1192) at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1159) at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:300) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60) at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200) at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327) at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302) at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167) at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162) at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:794) at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602) at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366) at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:405) at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2358) at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2327) at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78) at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2327) at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:233) at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:142) at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Please advice.

1 ACCEPTED SOLUTION

avatar
Contributor

It looks like that the URL you specified may be wrong. Can you please check if the URL is correct?

The correct URL format is as follows:

jdbc:phoenix:<zookeeper quorum>:<zookeeper port>:<zookeeper znode parent>

You might not have specified correct zookeeper znode parent.

View solution in original post

5 REPLIES 5

avatar
Expert Contributor

Hi @Anupam Kumar,

Could you please provide details whether cluster is kerberised(Secure) or un-kerberised(Unsecure)?

Thanks

Shubham

avatar
Explorer

@schhabra Its un-kerberised(Unsecure).

avatar
Contributor

It looks like that the URL you specified may be wrong. Can you please check if the URL is correct?

The correct URL format is as follows:

jdbc:phoenix:<zookeeper quorum>:<zookeeper port>:<zookeeper znode parent>

You might not have specified correct zookeeper znode parent.

avatar
Explorer

@Toshihiro Suzuki

jdbc:phoenix:ec2-111-11-11-11.compute-1.amazonaws.com:2181/hbase-unsecure

I have put in this format.

avatar
Explorer

Hi Friends,

I was putting the url incorrectly, ":" was missing from the url after the port number.

So the correct one is as below:

jdbc:phoenix:ec2-11-111-11-111.compute-1.amazonaws.com:2181:/hbase-unsecure

But now I am getting the below error:

Unexpected Error occurred attempting to open an SQL connection. class java.util.concurrent.TimeoutException: null

java.util.concurrent.TimeoutException at java.util.concurrent.FutureTask.get(FutureTask.java:205) 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(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Please advice.