Snowflake-Labs / sqltools-snowflake-driver

A Snowflake driver for the SQLTools VSCode extension.
MIT License
35 stars 15 forks source link

Unable to create connect #12

Open santoshkowshikhr opened 3 years ago

santoshkowshikhr commented 3 years ago

Hey Everyone,

I tried to create connection and test connections to my snowflake. It does not work, below are the errors.

[1613054209981] INFO  (ext): loaded extension information koszti.snowflake-driver-for-sqltools for driver Snowflake.
    ns: "ext-util"
[1613054209984] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1613054209985] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1613054209986] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1613054209989] INFO  (ls): Connection instance created for sfdev.
    ns: "conn-manager"
[1613054229260] ERROR (ls): Connecting error: {"code":401001,"data":{"driver":"Snowflake","driverOptions":{}},"name":"NetworkError"}
    ns: "conn-manager"
[1613054229264] ERROR (ext): ERROR: Error opening connection Network error. Could not reach Snowflake., {"code":401001,"data":{"driver":"Snowflake","driverOptions":{}}}
    ns: "error-handler"
[1613054521833] INFO  (ext): EXECUTING COMMAND => sqltools.showOutputChannel

any help is much apperciated.

koszti commented 3 years ago

this is the same issue as https://github.com/koszti/sqltools-snowflake-driver/issues/11. Will need to have a closer look and reproduce.

santoshkowshikhr commented 3 years ago

Maybe this could help. I use snowsql to connect to the same snowflake instance from cli, it has an extra parameter host which points to the external-facing proxy endpoint of my infra. Is that something we need to add as an optional parameter here? @koszti

koszti commented 3 years ago

SnowSQL docs says the --host parameter is deprecated and the account should be enough. And unfortunately the snowflake nodejs driver does not support the host parameter.

How do you specify the account? Do you use the short version rtXXXXX.eu-central-1 or the long version with the snowflakecomputing.com domain? The short version should be enough.

Also, I released 0.3.0 version of this vscode driver just now and added OCSP Fail-Open and Fail-Close options in the connection menu. Some people reported similar issues when OCSP mode is selected differently.

Can you please upgrade your Snowflake Driver for SQLTools in your VSCode to 0.3.0, and try again with OCSP Fail-Close and Fail-Open mode?

sfc-gh-kte commented 3 years ago

Hi @koszti, I received the same error as listed above. I upgraded to 0.3.0, set the OCSP Fail-Open to FALSE, and it works again. Thanks so much!