Reported Issue
"OSError: gRPC returned unavailable error, with message: failed to connect to all addresses. Detail: Unavailable"
Relevant Version
All versions of Arrow flight and Dremio Cloud
Troubleshooting Steps
When using yarrow from the example code in Github, the response is an "Unavailable" error.
Using the example code
https://github.com/dremio-hub/arrow-flight-client-examples/tree/main/python
You may try the example and see an error message. When running the following test (from MacOS) shows the endpoint is up and listening on port 443:
% nc -vz data.dremio.cloud 443
Connection to data.dremio.cloud port 443 [tcp/https] succeeded!
Cause
This is typically caused by missing a parameter in the command such as '-port 443' or '-tls' -- both of these params are required. The following example is missing the port and will result in an error.
% python3 example.py -query 'SELECT 1' -host data.dremio.cloud -tls -pat [mypat]
Steps to Resolve
Add all required params to the python command. The following has both the port and tls.
% python3 example.py -query 'SELECT 1' -host data.dremio.cloud -port 443 -tls -pat [mypat]
Next Steps
Update your code or script to include all the required parameters.
Summary
When getting on "OSError: gRPC returned unavailable error, with message: failed to connect to all addresses. Detail: Unavailable" -- When using pyarrow add all the required parameters to the python command. Here we add the port and specify tls for this use case :
% python3 example.py -query 'SELECT 1' -host data.dremio.cloud -port 443 -tls -pat [mypat]
Additional Resources
https://www.dremio.com/blog/connecting-to-dremio-using-apache-arrow-flight-in-python/
https://github.com/dremio-hub/arrow-flight-client-examples/blob/main/python/example.py
https://www.dremio.com/blog/pydremio/