Problem connecting Rstudio Server Pro to Snowflake with ODBC driver

Hi Friends,

I'm having trouble connecting my Rstudio Server Pro instance to my data in Snowflake with ODBC.

I have downloaded unixODBC and the Snowflake driver to my server and have configured the appropriate files as documented here & here. The files look like the following:

sudo cat /etc/odbcinst.ini

[Snowflake]

Driver = /opt/rstudio-drivers/snowflake/bin/lib/libsnowflakeodbc_sb64.so

RStudio_Version = 1.7.0-rc4

Simba_Version =

Installer = RStudio Pro Drivers

sudo cat /etc/odbc.ini

[Snowflake]

Driver = /opt/rstudio-drivers/snowflake/bin/lib/libsnowflakeodbc_sb64.so

UID = XXXXX

PWD = XXXXX

Server = XXXXX.us-east-2.aws.snowflakecomputing.com

Role = DATA_SCIENTIST

Database = STITCH_NEW

Warehouse = STITCH_WH

Schema = ROTOM_PROD_REPLICA

Locale = en-US

Tracing = 0

sudo cat odbcinst.ini.sample

[Snowflake]

Driver = /opt/rstudio-drivers/snowflake/bin/lib/libsnowflakeodbc_sb64.so

RStudio_Version = 1.7.0-rc4

Simba_Version =

Installer = RStudio Pro Drivers

The errors that I receive are:

  1. When I run isql Snowflake in my server I get the following error:

OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)

OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)

[ISQL]ERROR: Could not SQLConnect

  1. When I try to connect in my Rstudio Server GUI I get the following error when I attempt the connection:
library(DBI)
library(odbc)

con <- DBI::dbConnect(
drv = odbc::odbc(),
UID = 'XXXXX',
PWD = 'XXXXXX',
Server = 'XXXXXX.us-east-2.aws.snowflakecomputing.com',
Role = 'DATA_SCIENTIST',
Database = 'STITCH_NEW',
Warehouse = 'STITCH_WH',
Schema = 'ROTOM_PROD_REPLICA',
Driver = 'Snowflake'
)

OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) Error: nanodbc/nanodbc.cpp:983: 00000: [unixODBC][RStudio][Snowflake] (4) REST request for URL https://XXXXXX.us-east-2.aws.snowflakecomputing.com:443/session/v1/login-request?requestId=c17f3157-c297-4402-966b-8e5eb9ccf116&request_guid=d9587953-fd6d-4020-8da3-065ca049336a&databaseName=STITCH_NEW&schemaName=ROTOM_PROD_REPLICA&warehouse=STITCH_WH&roleName=DATA_SCIENTIST failed: CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No such file or directory'.

Can someone please help me figure out how to troubleshoot the driver and the connection? Thanks so much!

There may be an incomplete field in /opt/rstudio-drivers/snowflake/bin/lib/rstudio.snowflakeodbc.ini. Check for the following value:

CABundleFile = [INSTALL_DIR]/lib/cacert.pem

If that's present, adjust it to the following:

CABundleFile = /opt/rstudio-drivers/snowflake/bin/lib/cacert.pem

That should hopefully resolve the issue.

Wow! This straight up fixed everything! Thank you sooo much!

Rika

One quick follow up question - if I want to publish a rmd or shiny app from the server to Connect which utilizes Snowflake data - do I need to do the same set up(download drivers, unixODBC, configure files) that I did on the Rstudio Server Pro on the Rstudio Connect Server? Or is there a different set up for Connect than for Server Pro?

Thanks!

Rika

Yes, your intuition is correct - you will want to follow the same setup on the RStudio Connect Server.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.