-
Notifications
You must be signed in to change notification settings - Fork 473
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-1774037: OCSP check fails when execption is not of type RevocationCheckError #2094
Comments
hi - thanks for raising this issue with us. taking a look. do you think it would be possible to post a full(er) stack of the error thrown? we supposed to raise a edit: re: to diagnose why you're having OCSP errors, this could be helpful:
|
Hi @sfc-gh-dszmolka , thank you for the follow up. Yes, we are currently in the process of diagnosing the OCSP issue within our environment, suspect its a timeout due to some missing whitelisting. Errors started appearing with no code changes on our side so assuming something in either our SF tenant or GCP infra has changed. Will report back findings. Regardless, I suspect the error routine there is incorrect, which is making pin pointing this issue harder. Thanks again. |
Here are the results from the OCSP check, noting the failure on OCSP_RESPONDER: ocsp.pki.goog:80: URL Check: Failed: HTTP/1.1 404 Not Found
|
this issue seems to be coming from SnowCD itself, and is unrelated to the problem. (it looks to be trying to check
Is it possible to share it, from the original issue you saw? the stack of exceptions from the the python application, not just a single error line? |
Hello, everyone. On our project there was exactly the same problem described above knowhoper. The problem appeared also unexpectedly and without any changes in code/infrastructure. The error in the logs fully corresponds to the error attached by knowhoper. So far it turned out that everything works fine with insecure_mode=True. I would be very grateful for any help and information related to this issue. All the logs we were able to get:
Some important dependencies:
|
hi @flekkk thank you, this response was very useful! looks like, at least in your case, something causes the public key verification to somehow get 5 arguments:
despite only four should be passed: public_key.verify(
signature, digest, padding.PKCS1v15(), utils.Prehashed(chosen_hash)
) and we don't have error handling for this situation as it should never happen. Anyways; if you're up for a little more debugging and gathering more info, I created a patched version of 0.1 make sure you're running Snowflake PythonConnector 3.12.3, as the patch was made for this version. Should work with other 3.12.x too. I see you already have it.
or you can just use this very simple one to connect to Snowflake and import snowflake.connector
import logging
import os
for logger_name in ['snowflake','botocore']:
logger = logging.getLogger(logger_name)
logger.setLevel(logging.DEBUG)
ch = logging.FileHandler('python_connector.log')
ch.setLevel(logging.DEBUG)
ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
logger.addHandler(ch)
conn = snowflake.connector.connect(
user='REPLACE_USER',
password='REPLACE_PASSWORD',
account='REPLACE-ACCOUNT',
database='REPLACE_DB',
schema='REPLACE_SCHEMA'
)
conn.cursor().execute("PUT file:///PATH/TO/test.txt @REPLACE_STAGE OVERWRITE=TRUE") Main thing is, that either way, the DEBUG level logs need to be turned on. Thanks for your help here ! |
Hi, this seems to still happen for me even when upgraded to 3.12.3, started happening 11/8/24 any thoughts on what's wrong? it only happens for a very specific query that i do, only fetches 400 rows and I'm not sure why it happens using insecure_mode=True solves the issue
|
@opqpop & folks, this looks to be some issue in GCP US CENTRAL, when verifying the certificate during Snowflake/GCP Bucket connection. So far, could not reproduce with an account in GCP US CENTRAL, so if any of you has the possibility to try with the method described in this comment in the environment where the issue reproduces for you, and shares the debug logs, that could potentially massively help. Thanks in advance ! |
Python version
3.10.3
Operating system and processor architecture
macOS-14.7-arm64-arm-64bit
Installed packages
What did you do?
The text was updated successfully, but these errors were encountered: