Support Questions

Find answers, ask questions, and share your expertise

How do i connect to Phoenix query server using JDBC from server in another network

I'm trying to connect to Phoenix query server from my application which is deployed on a server which is another network using JDBC Zookeeper URL, I'm getting connection timeout.error, How do i resolve it??

14 REPLIES 14

@Teja sai tarun

Your client should be able to connect to zookeeper servers (irrespective of which network) then only you can connect and query from PQS.

Mentor

@Teja sai tarun

In a well-architected environment all access to the cluster is tunnelled through the edge node where user accounts are created and controlled, here all the client software is installed eg zk,Yarn,hdfs,hbase clients etc and configured by Ambari during the setup so the client versions are compatible.

In your setup, you might need to add a node which will become the edge node if you don't have one in place. This node can be in another network provided it can communicate with Ambari (ssh passwordless config) and firewalls should allow communication between this host and the cluster.

On the question of how to install you simply add the host using Ambari same method as adding a data node but you only choose to install the HDP clients, in a kerberized cluster Ambari is your best tool as it will generate the config files & keytabs correctly.

Remember to install the Kerberos client first and editing the krb5.conf accordingly. Remember always to have users access the cluster from the edge node. You can easily run your application from the edge node 🙂

Please let me know if this answered your query?

Can we install pheonix client in different server where hbase is not installed ?if yes how to install?

@Geoffrey Shelton Okot

We are using 3 -node cluster out of 2 are edge node and 1 is master node .

i am trying to connect to phoenix using edge node using JDBC connection to a server which is in another network but i'm unable to connect to Phoenix and getting TimOutException and SQL exception.

Can u please help me in resolving this issue..

Thanks,
Teja

Mentor

@Teja sai tarun

Any updates?

Mentor

@Teja sai tarun

I don't seem to understand your cluster setup (2 edge nodes and one Master)? Can you help me have a clearer picture

What HDP components are installed on the below nodes?

  • Edge node 1
  • Edge node 2
  • Master node

How are you trying to connect to what component ie HBase and on which host. Can you share the whole error stack trace (TimOutException and SQL exceptions)

Firewall should be disabled between the cluster hosts. Can you share how you are trying to connect to your destination db?

Mentor

@Teja sai tarun

Any updates?

I have posted the related details U have asked for can u kindly refer that n provide some suggestions. I have uploaded the error logs please find the post in answers above

Mentor

@Teja sai tarun

First, you will need to resolve the hostname issue it seems, your AWS hbase host is unknown see the highlighted portion

96570-teja-sai.jpg

Are you trying to connect from edge node on LAN to node in AWS? if you should use the public IP of your AWS. If so the corresponding ports should be accessible from your edgenode.

Please correct me if I am wrong

I am trying to connect from a server in AWS in one security group to server in AWS which is in another security group.

I am using public FQDN in phoenix jdbc url and I opened corresponding port in AWS.

-->i am able to ping and telnet with port i am using to corresponding host which i am connecting to .

Mentor

@Teja sai tarun

Thanks for the clarification, in AWS the servers should have a common security group. You can not use the same Security Group for multiple VPC it's specific to a single VPC.

However, you can copy a Security Group to create a new Security Group with the same rules in another VPC for the same AWS Account.

HTH

Both the servers are in different security groups and VPC's.

Mentor

@Teja sai tarun

Any updates?

No still working on it.

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