Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

JDBC driver encountered communication error when connecting snowflake database from Nifi

avatar
New Contributor

I set up the nifi in a window environment. I have a ​controller in nifi that uses JDBC connection to snowflake in the following format:

jdbc:snowflake://<account>.<region>.snowflakecomputing.com/

I have driver class name as net.snowflake.client.jdbc.SnowflakeDriver and have placed the snowflake-jdbc-3.8.1 in the nifi lib folder.

The Java version is jre1.8.0_144.

When executing sql using this connection, I got the following error in the nifi app log:

net.snowflake.client.jdbc.SnowflakeSQLException: JDBC driver encountered communication error. Message: Exception encountered for HTTP request: Connect to <account>.<region>.snowflakecomputing.com:443 [*******] failed: Connection timed out: connect.

at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:323)

at net.snowflake.client.core.HttpUtil.executeRequestInternal(HttpUtil.java:444)

at net.snowflake.client.core.HttpUtil.executeRequest(HttpUtil.java:391)

at net.snowflake.client.core.HttpUtil.executeRequest(HttpUtil.java:363)

at net.snowflake.client.core.SessionUtil.newSession(SessionUtil.java:575)

at net.snowflake.client.core.SessionUtil.openSession(SessionUtil.java:267)

at net.snowflake.client.core.SFSession.open(SFSession.java:462)

at net.snowflake.client.jdbc.SnowflakeConnectionV1.<init>(SnowflakeConnectionV1.java:131)

at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:148)

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:53)

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:291)

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2395)

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2381)

Because I'm trying it on a workstation that's behind proxy, so I thought to add http proxy setting in nifi config (as mentioned in

https://community.hortonworks.com/content/supportkb/167107/unable-to-perform-http-connections-throug...), even though I already have the http proxy settings in the environment variables. That didn't change the error, except for it does try to connect to our proxy server first, as indicated in the app log.

I'm able to connect to snowflake through web browser fine, so want to see if it's an issue with nifi setting too. Thanks in advance.

4 REPLIES 4

avatar
Expert Contributor

Can someone please point to me how and where to add the proxy in the nifi.properties file so that I can get Nifi connected to Snowflake. 

avatar

@abhinav_joshi ,

 

While we welcome your question, you should have an easier time obtaining a tailored response by posting your question to the community for Snowflake.

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Expert Contributor

hi , I just want to access the following link provided in the responses above

https://community.hortonworks.com/content/supportkb/167107/unable-to-perform-http-connections-throug...)

 

I tried clicking on the link above however , I didnt get any result . The page was blank . Can someone provide me the correct link here so that I can get to know how to configure the proxy in Nifi config. 

 

avatar
Expert Contributor

Hi Guys, I have stumbled on the same issue however I am not sure where to add the proxy in the nifi config. I also tried to click on the link suggested however couldnt get anything there. Can someone please let me know where / how to add the proxy on the nifi server so that we can then connect to snowflake. Its a big show stopper for us in our project . Really need some help here !!! 

 

Many thanks in Advance