6

I am trying to use the snowflake connector inside docker container. I want to use the externalbrowser authenticator so that I can make connection using Okta credentials but the connector is failing with below mentioned error.

DatabaseError: (snowflake.connector.errors.DatabaseError) 250008 (08001): None: Failed to connect to DB: xx.snowflakecomputing.com:443, Unable to open a browser in this environment. (Background on this error at: http://sqlalche.me/e/13/4xp6)

3 Answers3

1

As an aside, I'd recommend removing your account name from the question (shown in the error).

You are correct that the "externalbrowser" option is a browser-based SSO. It might be possible to get this running a docker container with some extended software and configuration, but I wouldn't recommend it as it doesn't seem worth the effort.

Instead, there's alternative SSO authentication methods you can look at such as Native SSO Okta, key-pair authentication, or external OAuth. These won't require the browser.

Suzy Lockwood
  • 1,050
  • 4
  • 6
0

I spent hours trying to find a solution for that as I use SSO + MFA and there was no way to do that with 'Native SSO Okta' for example. And today GPT4 just found a simple solution for me. I run the docker container like that docker run -it <docker-image> run -m <my_model>

It tries to open the web browser, can't do it so gives me a URL to copy paste into my browser on the host to proceed with the authentication and then asks me to copy paste the URL I am redirected to into the terminal and it works.

Pierre
  • 938
  • 1
  • 15
  • 37
0

I curled the url returned from SSO in the VS Code terminal on the devcontainer and I logged on to Snowflake in VS Code Jupyter Notebook. curl <url>

jgrygolec
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 12 '23 at 10:23