-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python(go?): Error when using TLS with FlightSQL ADBC driver #715
Comments
Hmm, the Go driver needs to include more diagnostic info about which server it's talking to. But one off-the-top-of-my-head guess is that the FlightInfo might be using a |
Also, I agree the driver should make it easier to debug what's going on...There is an issue for adding more logging in #492 |
My initial guess was that it might be something related to the scheme, but it seems to establish the TLS connection just fine and the server handles the request correctly and responds correctly (based on logs). The issue seems to be while the client receives the response. Some logging would certainly help! |
There's two requests. The initial connection may be fine but when the client goes to fetch the data, it connects based on the info in the server's FlightInfo response. If the info in that response is using the wrong scheme you may see errors like this. |
Ahhh that was it! We were using the same Location ( Interestingly enough, this works fine when using the JDBC driver.... does that mean that the JDBC driver is ignoring the flight endpoints provided by |
Unfortunately, yes. The JDBC driver is not compliant with the Flight SQL spec: apache/arrow#34532 |
And yes, stuff like this is why I'd like to improve the logging and add more context in error messages so it's clear what failed in a potentially multi-request chain (e.g. with a prepared statement, you might see 5 requests...) |
Ahhh that makes sense! Thanks for the help! Good thing for us we're just using the same server for now, but if I get some time I might try to fix that on the JDBC side. The only potential problem would be if servers aren't correctly sending the location back in FlightInfo requests this will cause clients to break, so it might need some sort of fallback logic if it detects that the main server is hosted elsewhere and the FlightInfo specifies a localhost endpoint. Closing this issue now that I know what's going on. |
I've been trying to do some testing using the Python ADBC driver against our FlightSQL service and I've run into issues when TLS is enabled. If I disable TLS and test locally it works as expected, but with TLS enabled I get some very strange errors.
If I try to hit our service in Prod, where the TLS handshake happens in our load balancer, this is the error on the client:
However, when I look in DataDog I see the request and the correct response with a status
0
. What's strange is that theInvalid credentials
error is one that we actually do send back from theauthenticate
function, but I don't see any traces or logs in DataDog returning this error when I test this.I tried to debug this locally by enabling TLS with a self signed cert. When I try this, the logs in my service seem like everything worked fine:
But on the client side I get:
Here's the code for the example client, and it takes in a single argument which is a JDBC connection string like
jdbc:arrow-flight-sql://localhost:9876?customId=<id>&token=<token>
.I feel like if I knew Go I might be able to try some debugging within the Go driver, but unfortunately I've got no experience with it. Any help on how I might further debug would be greatly appreciated!
The text was updated successfully, but these errors were encountered: