Skip to content
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-1548930: No Appropiate Protocol #1839

Closed
wise-coders opened this issue Jul 22, 2024 · 2 comments
Closed

SNOW-1548930: No Appropiate Protocol #1839

wise-coders opened this issue Jul 22, 2024 · 2 comments
Assignees
Labels
invalid status-triage_done Initial triage done, will be further handled by the driver team

Comments

@wise-coders
Copy link

wise-coders commented Jul 22, 2024

Connecting from OpenJdk 17.0.12 to Snowflake by Google Cloud, I got this error.
The JDBC URL is jdbc:snowflake://https://account.snowflakecomputing.com?client_metadata_request_use_connection_ctx=true
The driver version is 3.17.0.
What could be wrong?

net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver encountered communication error. Message: No appropriate protocol (protocol is disabled or cipher suites are inappropriate).
at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:286)
at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:75)
at net.snowflake.client.core.HttpUtil.executeRequestInternal(HttpUtil.java:810)
at net.snowflake.client.core.HttpUtil.executeRequest(HttpUtil.java:737)
at net.snowflake.client.core.HttpUtil.executeGeneralRequest(HttpUtil.java:652)
at net.snowflake.client.core.SessionUtil.newSession(SessionUtil.java:662)
at net.snowflake.client.core.SessionUtil.openSession(SessionUtil.java:311)
at net.snowflake.client.core.SFSession.open(SFSession.java:637)
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initialize(DefaultSFConnectionHandler.java:129)
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initializeConnection(DefaultSFConnectionHandler.java:102)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.initConnectionWithImpl(SnowflakeConnectionV1.java:146)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.(SnowflakeConnectionV1.java:123)
at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:227)
at com.wisecoders.dbs.dbms.connect.model.envoy.Envoy.init(Envoy.java:101)
at com.wisecoders.dbs.dbms.connect.model.envoy.Envoy.getMetaData(Envoy.java:136)
at com.wisecoders.dbs.dbms.connect.fx.FxTestConnectivityTask.call(FxTestConnectivityTask.java:44)
at com.wisecoders.dbs.dbms.connect.fx.FxTestConnectivityTask.call(FxTestConnectivityTask.java:19)
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at java.base/sun.security.ssl.HandshakeContext.(HandshakeContext.java:172)
at java.base/sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:103)
at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:247)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:448)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at net.snowflake.client.jdbc.internal.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
at net.snowflake.client.jdbc.internal.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at net.snowflake.client.jdbc.internal.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at net.snowflake.client.jdbc.internal.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:271)
at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:75)
at net.snowflake.client.core.HttpUtil.executeRequestInternal(HttpUtil.java:810)
at net.snowflake.client.core.HttpUtil.executeRequest(HttpUtil.java:737)
at net.snowflake.client.core.HttpUtil.executeGeneralRequest(HttpUtil.java:652)
at net.snowflake.client.core.SessionUtil.newSession(SessionUtil.java:662)
at net.snowflake.client.core.SessionUtil.openSession(SessionUtil.java:311)
at net.snowflake.client.core.SFSession.open(SFSession.java:637)
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initialize(DefaultSFConnectionHandler.java:129)
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initializeConnection(DefaultSFConnectionHandler.java:102)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.initConnectionWithImpl(SnowflakeConnectionV1.java:146)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.(SnowflakeConnectionV1.java:123)
at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:227)
at com.wisecoders.dbs.dbms.connect.model.envoy.Envoy.init(Envoy.java:101)
at com.wisecoders.dbs.dbms.connect.model.envoy.Envoy.getMetaData(Envoy.java:136)
at com.wisecoders.dbs.dbms.connect.fx.FxTestConnectivityTask.call(FxTestConnectivityTask.java:44)
at com.wisecoders.dbs.dbms.connect.fx.FxTestConnectivityTask.call(FxTestConnectivityTask.java:19)

  1. What version of JDBC driver are you using?

  2. What operating system and processor architecture are you using?

  3. What version of Java are you using?

  4. What did you do?

    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.

  5. What did you expect to see?

    What should have happened and what happened instead?

  6. Can you set logging to DEBUG and collect the logs?

    https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors

  7. What is your Snowflake account identifier, if any? (Optional)

@github-actions github-actions bot changed the title No Appropiate Protocol SNOW-1548930: No Appropiate Protocol Jul 22, 2024
@sfc-gh-wfateem sfc-gh-wfateem self-assigned this Jul 23, 2024
@sfc-gh-wfateem sfc-gh-wfateem added the status-triage Issue is under initial triage label Jul 23, 2024
@sfc-gh-wfateem
Copy link
Collaborator

Hi @wise-coders,

Thanks for reaching out and opening this issue.

I updated your comment to scrub out the hostname. That JDBC connection string doesn't look right, specifically:

jdbc:snowflake://https://account.snowflakecomputing.com

The https portion shouldn't be there. I don't know if this was just a typo on your behalf when writing out the description or if this is the actual URL string being used. If it's the latter, then try removing https://.

Other than that, this is a very rare issue and we haven't been able to get to the cause because other than you, there was only one more user that reported this issue: snowflakedb/snowflake-kafka-connector#825

Can you turn on debugging for your JDBC driver? The easiest way to achieve that is to use the instructions here. Please set the logging level to TRACE. Once you do that and you generate the log after reproducing the issue, can you please find the following log line and paste it here so I can get an idea of where things might have gone wrong?

TRACE SFSSLConnectionSocketFactory: Cipher suites used:

Here's an example of the same log message from a working environment:

TRACE SFSSLConnectionSocketFactory: Cipher suites used: [TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]

@wise-coders
Copy link
Author

Thank you. Fixing the URL as suggested fixed the isssue.

@sfc-gh-wfateem sfc-gh-wfateem added invalid status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants