https://pinot.apache.org/ logo
#general
Title
# general
v

Vishnu Ghanta

05/02/2022, 12:22 PM
Hey guys, I am trying to establish jdbc connection to execute queries on pinot cluster. The pinot cluster is deployed on production environment and i am connecting from local(port forwarded pinot controller) to test the jdbc feature. I think while executing the query, the controller is resolving the broker with its name rather than IP and hence getting unknownhost exception.
Copy code
Caused by: org.apache.pinot.client.PinotClientException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.net.UnknownHostException: pinot-broker-0.pinot-broker-headless.xxxxx-v2.svc.cluster.local: nodename nor servname provided, or not known
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport.executeQuery(JsonAsyncHttpPinotClientTransport.java:104)
	at org.apache.pinot.client.Connection.execute(Connection.java:127)
	at org.apache.pinot.client.Connection.execute(Connection.java:96)
	at org.apache.pinot.client.PinotStatement.executeQuery(PinotStatement.java:63)
	... 1 more
Is there a way i can avoid this error because the same might happen when i move to production(Application is in different k8s cluster). TIA
k

Kartik Khare

05/02/2022, 12:24 PM
Hi, currently the broker hostname needs to be resolvable from the machine on which client is running
m

Mayank

05/02/2022, 1:11 PM
Yes, also please directly use broker for querying in production. The controller endpoint is only for query console, and it also calls the broker api internally
k

Kartik Khare

05/02/2022, 8:18 PM
The question here is regarding JDBC driver. It fetches brokers list from the provided tenant from the controller. The queries are sent to brokers only. However, it can cause issues if broker hostname:port is not resolvable from the client machine. @User Is there a solution for such cases ?
m

Mayank

05/02/2022, 8:21 PM
The brokers should be behind an LB and the driver can just be specified that instead of fetching from controller, right? I think it was implemented that way due to absence of LB.
x

Xiang Fu

05/02/2022, 11:36 PM
so far there is no such option, one thing is to init the jdbc by just using the broker LB name, so no hostname resolution is required.
m

Mayank

05/02/2022, 11:38 PM
The pinot-java-client does have the broker list config. If it is missing from jdbc client we should add it.
x

Xiang Fu

05/02/2022, 11:38 PM
right
g

Gurpreet Singh

09/28/2023, 10:21 AM
Hi all, can we not define broker's ingress/LB name in controller config somewhere?
x

Xiang Fu

09/28/2023, 8:55 PM
Where you put broker ingress/LB name in controller? Broker ingress/LB should be configured in your k8s cluster networking, And it’s only used by the query client to connect to.
3 Views