-
Notifications
You must be signed in to change notification settings - Fork 485
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
SNOW-1319756: Cannot connect to Snowflake using externalbrowser in a Docker container when running as a script #1917
Comments
hi - this looks like a duplicate of #1637 , a feature request to support if you think your issue is entirely different, do comment please and i can reopen and look further. |
@sfc-gh-dszmolka I'm not sure if it's the same issue, but it doesn't appear to be. I'm able to connect to Snowflake using Oddly, if I include a |
The |
started looking at the issue and noticed the following:
observe
almost as the connector would believe that up to the first dot (which is usually the region separator like Obviously, our situation is different in a way that I don't have a reverse proxy in front of my Snowflake account but when I run the script in a container in a non-interactive manner:
it threw the Okta URL, which when manually copied into a browser then the response back into the prompt opened by the PythonConnector, allows to authenticate and run the select. Would you be able to test a couple of things and see if they help?
Can you please check sometimes when you get a chance ? |
@sfc-gh-dszmolka Thanks for looking into this. I hardcoded the account ID in the format of
When I remove the
In case it's helpful, here's a log file when I'm able to successfully connect in the python shell
|
@rschack-cedar thank you for testing ! So getting the SAML assertion error means you actually got past the original error ( But that means you now at least could connect to Snowflake (and the auth attempt was refused), contrary to the prior status of the connection being unexpectedly closed down by the proxy) I would guess the SAML response is purposefully built in such a way for your company because you depend on the various attributes, this is not a problem. How to proceed with this issue?
|
@sfc-gh-dszmolka Thanks David, I will investigate our reverse proxy (Cyral) in more detail. We were able to temporarily disable it, and I could connect to Snowflake (after removing the |
this is good news, thank you for letting me know ! Now the investigation can be focused at least. |
Python version
Python 3.11.6 (main, Nov 29 2023, 04:07:34) [GCC 10.2.1 20210110]
Operating system and processor architecture
Linux-6.6.12-linuxkit-aarch64-with-glibc2.31
Installed packages
What did you do?
While in a docker container, I'm unable to connect to Snowflake using
externalbrowser
(script below). Oddly, however, if I run the script interactively in a python shell, I can authenticate and connect to Snowflake without any issue. It's worth mentioning that we use a Cyral sidecar with SnowflakeThe
Dockerfile
anddocker-compose.yml
files:What did you expect to see?
When running in a script, the authentication fails with the following error:
snowflake.connector.errors.OperationalError: 250001: 250001: Could not connect to Snowflake backend after 2 attempt(s).Aborting
. When running the same program in an interactive python shell, it succeeds (output from interactive session below):Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: