CreativeDataEU / PowerBITrinoConnector

A Micosoft Power BI Custom Connector allowing you to import Trino data into Power BI.
MIT License
50 stars 15 forks source link

Issues to connect Trino in EMR #5

Closed cnx-lucaspassos closed 1 year ago

cnx-lucaspassos commented 1 year ago

Hi guys, great work!

I'm trying to connect a powerbi desktop using the custom connector developed. I'm facing a issue when I try to use it

(translated from Portuguese) DataSource.Error: The connection is closed. Unexpected error during a send. Details https://172.31.54.190:8889/v1/statement

That's the config properties from EMR cluster

coordinator=true node-scheduler.include-coordinator=false discovery.uri=http://ip-172-31-54-190.sa-east-1.compute.internal:8889 http-server.threads.max=500 discovery-server.enabled=true sink.max-buffer-size=1GB query.max-memory=9830MB query.max-memory-per-node=3345779524B query.max-history=40 query.min-expire-age=30m query.client.timeout=30m query.stage-count-warning-threshold=100 query.max-stage-count=150 http-server.http.port=8889 http-server.log.path=/var/log/trino/http-request.log http-server.log.max-size=67108864B http-server.log.max-history=5 log.max-size=268435456B log.max-history=5 jmx.rmiregistry.port = 9080 jmx.rmiserver.port = 9081

I'm able to use it from a JDBC driver.

Any tips to what's happening here?

pichlerpa commented 1 year ago

Hi @cnx-lucaspassos,

are you sure about the host https://172.31.54.190:8889? Can you open the UI in the browser? Otherwise you could also use a HTTP sniffer such as Fiddler to see whats going when the connector tries to communicate.

Hope that helps, Patrick

cnx-lucaspassos commented 1 year ago

Hi @pichlerpa

Actually I can't connect the page using https, it works on http.

https image

http image

Dont worry about the IP. EMR works using dynamic ip association every time we start the cluster. But it's the same configuration.

pichlerpa commented 1 year ago

@cnx-lucaspassos seems like you haven't HTTPS enabled, then it also won't work using Power BI. Try to use HTTP host together with "Anonymous" authentication. I also believe if you want to user Username&Password you need to enable HTTPS. Let me know, if it works.

cnx-lucaspassos commented 1 year ago

Hi @pichlerpa

Wow.. It makes sense. I just tried using the Anonymous auth and it works. I will enable the SSL to get it with a minimum level of security.

I`m going to close the issue. Many, many thanks for your support.

Congratz for the connector. Awsome