snowflakedb / snowflake-connector-python

Snowflake Connector for Python
https://pypi.python.org/pypi/snowflake-connector-python/
Apache License 2.0
579 stars 467 forks source link

Connection Error to snowflake: 250001 (08001): Failed to connect to DB: <accountid>.snowflakecomputing.com:443. Incoming request does not contain a valid payload. #331

Closed Alonreznik closed 1 year ago

Alonreznik commented 4 years ago

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using (python --version)? 2.7.14

  2. What operating system and processor architecture are you using (python -c 'import platform; print(platform.platform())')? ('platform.platform:', 'Windows-10-10.0.18362')

  3. What are the component versions in the environment (pip list)?

    Package                       Version          Location
    ----------------------------- ---------------- -----------------------------------------------
    adal                          0.5.0
    apiclient                     1.0.2
    appdirs                       1.4.3
    APScheduler                   3.0.0
    argcomplete                   0.8.4
    asn1crypto                    1.3.0
    astroid                       1.6.6
    attrs                         18.1.0
    awscli                        1.16.88
    azure-common                  1.1.8
    azure-mgmt-authorization      0.30.0
    azure-mgmt-datalake-analytics 0.4.0
    azure-mgmt-datalake-nspkg     2.0.0
    azure-mgmt-nspkg              2.0.0
    azure-nspkg                   2.0.0
    azure-storage                 0.34.2
    azure-storage-blob            2.1.0
    azure-storage-common          2.1.0
    azure-storage-nspkg           3.1.0
    Babel                         2.5.3
    backports-abc                 0.5
    backports.csv                 1.0.6
    backports.functools-lru-cache 1.5
    bcrypt                        3.1.4
    beatbox                       0.96             
    beautifulsoup4                4.8.1
    bingads                       11.5.8
    boto                          2.48.0
    boto3                         1.10.50
    botocore                      1.13.50
    cached-property               1.4.3
    cachetools                    2.0.1
    certifi                       2018.4.16
    cffi                          1.11.5
    chardet                       3.0.4
    colorama                      0.3.7
    coloredlogs                   10.0
    configparser                  3.5.0
    confluent-kafka               1.2.0
    croniter                      0.3.24
    cryptography                  2.5
    cx-Oracle                     7.3.0
    decorator                     4.3.0
    defusedxml                    0.5.0
    Delorean                      0.6.0
    dill                          0.2.8.2
    docutils                      0.14
    dynamodb-json                 1.2
    enum34                        1.1.6
    executor                      21.3
    facebook-business             3.0.5
    facebookads                   2.11.4
    fasteners                     0.14.1
    ftfy                          4.4.3
    ftputil                       3.3.1
    funcsigs                      1.0.2
    future                        0.16.0
    futures                       3.2.0
    gapic-google-cloud-logging-v2 0.90.1
    gcs-oauth2-boto-plugin        1.9
    google-api-python-client      1.6.1
    google-apitools               0.4.9
    google-auth                   1.6.2
    google-auth-httplib2          0.0.3
    google-auth-oauthlib          0.2.0
    google-cloud-core             0.22.1
    google-cloud-logging          0.22.0
    google-gax                    0.15.16
    googleads                     14.1.0
    googleapis-common-protos      1.5.3
    grpc-google-cloud-logging-v2  0.90.0
    html5lib                      1.0.1
    httplib2                      0.11.3
    humanfriendly                 4.17
    humanize                      0.5.1
    idna                          2.7
    ijson                         2.3
    importlib                     1.0.3
    ipaddress                     1.0.22
    isodate                       0.6.0
    isort                         4.3.20
    itsdangerous                  0.24
    JayDeBeApi                    1.1.1
    Jinja2                        2.9.6
    jmespath                      0.9.3
    JPype1                        0.6.3
    jsonpath-rw                   1.4.0
    jsonpath-rw-ext               1.2.2
    jsonschema                    2.4.0
    kafka-python                  1.4.7
    keyring                       11.0.0
    lazy-object-proxy             1.4.1
    logging                       0.4.9.6
    logstash-formatter            0.5.9
    lxml                          4.2.3
    MarkupSafe                    1.0
    mccabe                        0.6.1
    mechanize                     0.2.5
    mock                          2.0.0
    monotonic                     1.5
    msgpack                       0.6.2
    msrest                        0.4.26
    msrestazure                   0.4.22
    multiprocess                  0.70.6.1
    mysql-replication             0.18
    numpy                         1.15.4
    oauth2client                  4.1.3
    oauthlib                      0.7.2
    oscrypto                      1.2.0
    ox3apiclient                  0.6.0
    pandas                        0.24.2
    paramiko                      2.4.1
    pathos                        0.2.1
    pbr                           3.1.1
    pip                           18.0
    ply                           3.8
    pox                           0.2.4
    ppft                          1.6.4.8
    prettytable                   0.7.2
    property-manager              2.3.1
    protobuf                      3.5.1
    protorpc                      0.12.0
    psycopg2                      2.8.2
    py4j                          0.8.2.1
    pyasn1                        0.4.3
    pyasn1-modules                0.2.1
    pycountry                     19.8.18
    pycparser                     2.18
    pycryptodome                  3.4.7
    pycryptodomex                 3.8.2
    PyJWT                         1.5.3
    pylint                        1.9.4
    pylzma                        0.4.9
    pymongo                       3.10.0
    pymssql                       2.1.4
    PyMySQL                       0.6.6
    PyNaCl                        1.2.1
    pyodbc                        4.0.26
    pyOpenSSL                     17.5.0
    pypiwin32                     223
    pyreadline                    2.1
    pysftp                        0.2.9
    PySocks                       1.6.8
    python-dateutil               2.7.3
    python-magic                  0.4.15
    python-mimeparse              0.1.4
    pytz                          2017.3
    pywin32                       224
    pywin32-ctypes                0.1.2
    PyYAML                        3.13
    rarfile                       2.8
    regex                         2017.11.9
    requests                      2.22.0
    requests-futures              0.9.9
    requests-oauthlib             0.8.0
    requests-toolbelt             0.8.0
    retry-decorator               1.1.0
    rsa                           3.4.2
    s3transfer                    0.2.1
    setuptools                    43.0.0
    simplejson                    3.15.0
    singledispatch                3.4.0.3
    six                           1.11.0
    snowflake-connector-python    2.0.4
    snowflake-sqlalchemy          1.0.9
    SocksiPy-branch               1.1
    soupsieve                     1.9.5
    SQLAlchemy                    1.3.17
    sqlparse                      0.3.0
    sshtunnel                     0.1.5
    stopit                        1.1.2
    suds-jurko                    0.6
    td-client                     0.14.0
    time-uuid                     0.1.1
    tzlocal                       1.5.1
    unicodecsv                    0.14.1
    uritemplate                   3.0.0
    urllib3                       1.23
    verboselogs                   1.7
    wcwidth                       0.1.7
    webencodings                  0.5.1
    wheel                         0.30.0
    win-inet-pton                 1.0.1
    wrapt                         1.11.1
    xlrd                          0.9.4
    xmljson                       0.1.6
    xmltodict                     0.10.2
    yappi                         1.0
    zeep                          3.1.0
  4. What did you do? Just trying to connect to snowflake using the library:

from snowflake import connector
connector.connect(user='RiveryIo',
                                            password=pwd,
                                            account='zn19366.eu-central-1',
                                            application=<'myApp>')
  1. What did you expect to see? The connection working :)

  2. What did you see instead?

The next error in most of the times:

Connection Error to snowflake: 250001 (08001): Failed to connect to DB: _<accountid>_.snowflakecomputing.com:443. Incoming request does not contain a valid payload.
  1. Can you set logging to DEBUG and collect the logs?
C:\workspace\python_env\rivery_back\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2019.2\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 51927 --file C:/workspace/rivery_back/sandbox/aaa.py
pydev debugger: process 17920 is connecting

Connected to pydev debugger (build 193.6015.41)
2020-06-25 10:33:39,023 - MainThread ssl_wrap_socket.py:86 - inject_into_urllib3() - DEBUG - Injecting ssl_wrap_socket_with_ocsp
2020-06-25 10:33:39,038 - MainThread auth.py:71 - <module>() - DEBUG - cache directory: C:\Users\alonr\AppData\Local\Snowflake\Caches
2020-06-25 10:33:39,687 - MainThread cursor.py:40 - <module>() - DEBUG - Failed to import pyarrow. No Apache Arrow result set format can be used.
2020-06-25 10:33:39,688 - MainThread cursor.py:47 - <module>() - DEBUG - Failed to import ArrowResult. No Apache Arrow result set format can be used.
2020-06-25 10:33:39,701 - MainThread connection.py:178 - __init__() - INFO - Snowflake Connector for Python Version: 2.0.4, Python Version: 2.7.14, Platform: Windows-10-10.0.18362
2020-06-25 10:33:39,701 - MainThread connection.py:478 - connect() - DEBUG - connect
2020-06-25 10:33:39,701 - MainThread connection.py:717 - __config() - DEBUG - __config
2020-06-25 10:33:39,701 - MainThread connection.py:792 - __config() - INFO - This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2020-06-25 10:33:39,703 - MainThread converter.py:140 - __init__() - DEBUG - use_numpy: False
2020-06-25 10:33:39,703 - MainThread converter_issue23517.py:27 - __init__() - DEBUG - initialized
2020-06-25 10:33:39,703 - MainThread connection.py:643 - __open_connection() - DEBUG - REST API object was created: zn19366.eu-central-1.snowflakecomputing.com:443
2020-06-25 10:33:39,703 - MainThread auth.py:129 - authenticate() - DEBUG - authenticate
2020-06-25 10:33:39,703 - MainThread auth.py:153 - authenticate() - DEBUG - assertion content: *********
2020-06-25 10:33:39,703 - MainThread auth.py:165 - authenticate() - DEBUG - account=zn19366, user=RiveryIO, database=None, schema=None, warehouse=None, role=None, request_id=8b0690f3-66da-4e01-bf19-237f3a72cf96
2020-06-25 10:33:39,703 - MainThread auth.py:191 - authenticate() - DEBUG - body['data']: {u'CLIENT_APP_VERSION': u'2.0.4', u'CLIENT_APP_ID': u'PythonConnector', u'CLIENT_ENVIRONMENT': {u'PYTHON_VERSION': u'2.7.14', u'APPLICATION': 'Rivery', u'OS_VERSION': 'Windows-10-10.0.18362', u'OCSP_MODE': 'FAIL_OPEN', u'PYTHON_COMPILER': 'MSC v.1500 32 bit (Intel)', u'OS': 'Windows', u'PYTHON_RUNTIME': 'CPython'}, u'SESSION_PARAMETERS': {u'CLIENT_PREFETCH_THREADS': 4, u'CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY': 900}, u'LOGIN_NAME': 'RiveryIO', u'SVN_REVISION': None, u'ACCOUNT_NAME': u'zn19366'}
2020-06-25 10:33:39,704 - MainThread network.py:940 - _use_requests_session() - DEBUG - Active requests sessions: 1, idle: 0
2020-06-25 10:33:39,704 - MainThread network.py:639 - _request_exec_wrapper() - DEBUG - remaining request timeout: 120, retry cnt: 1
2020-06-25 10:33:39,706 - MainThread network.py:778 - _request_exec() - DEBUG - socket timeout: 60
2020-06-25 10:33:40,729 - MainThread ocsp_snowflake.py:383 - reset_cache_dir() - DEBUG - cache directory: C:\Users\alonr\AppData\Local\Snowflake\Caches
2020-06-25 10:33:40,743 - MainThread ssl_wrap_socket.py:391 - ssl_wrap_socket_with_ocsp() - DEBUG - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2020-06-25 10:33:40,743 - MainThread ocsp_snowflake.py:422 - reset_ocsp_response_cache_uri() - DEBUG - ocsp_response_cache_uri: file://C:/Users/alonr/AppData/Local/Snowflake/Caches/ocsp_response_cache.json
2020-06-25 10:33:40,743 - MainThread ocsp_snowflake.py:424 - reset_ocsp_response_cache_uri() - DEBUG - OCSP_VALIDATION_CACHE size: 0
2020-06-25 10:33:40,743 - MainThread ocsp_snowflake.py:218 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2020-06-25 10:33:40,743 - MainThread ocsp_snowflake.py:252 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP dynamic cache server RETRY URL: None
2020-06-25 10:33:40,815 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:40,869 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:40,941 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:40,973 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,030 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,088 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,219 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,401 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,474 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,575 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,605 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,785 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,844 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,937 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:41,979 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:42,036 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:42,122 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:42,161 - MainThread ocsp_snowflake.py:460 - read_ocsp_response_cache_file() - DEBUG - Read OCSP response cache file: C:/Users/alonr/AppData/Local/Snowflake/Caches/ocsp_response_cache.json, count=163
2020-06-25 10:33:42,163 - MainThread ocsp_snowflake.py:972 - validate() - DEBUG - validating certificate: zn19366.eu-central-1.snowflakecomputing.com
2020-06-25 10:33:42,164 - MainThread ocsp_pyasn1.py:216 - extract_certificate_chain() - DEBUG - # of certificates: 4
2020-06-25 10:33:42,171 - MainThread ocsp_pyasn1.py:226 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.3'), ('value', '\x0c%*.eu-central-1.snowflakecomputing.com')])]])]), issuer: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.11'), ('value', '\x13\x0cServer CA 1B')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x06Amazon')])]])])
2020-06-25 10:33:42,180 - MainThread ocsp_pyasn1.py:226 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.11'), ('value', '\x13\x0cServer CA 1B')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x06Amazon')])]])]), issuer: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x10Amazon Root CA 1')])]])])
2020-06-25 10:33:42,187 - MainThread ocsp_pyasn1.py:226 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x10Amazon Root CA 1')])]])]), issuer: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.8'), ('value', '\x13\x07Arizona')])], [OrderedDict([('type', '2.5.4.7'), ('value', '\x13\nScottsdale')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x1cStarfield Technologies, Inc.')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x132Starfield Services Root Certificate Authority - G2')])]])])
2020-06-25 10:33:42,197 - MainThread ocsp_pyasn1.py:226 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.8'), ('value', '\x13\x07Arizona')])], [OrderedDict([('type', '2.5.4.7'), ('value', '\x13\nScottsdale')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x1cStarfield Technologies, Inc.')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x132Starfield Services Root Certificate Authority - G2')])]])]), issuer: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x1cStarfield Technologies, Inc.')])], [OrderedDict([('type', '2.5.4.11'), ('value', '\x13)Starfield Class 2 Certification Authority')])]])])
2020-06-25 10:33:42,210 - MainThread ocsp_pyasn1.py:124 - read_cert_bundle() - DEBUG - reading certificate bundle: C:\workspace\python_env\rivery_back\lib\site-packages\certifi\cacert.pem
��
2020-06-25 10:33:43,157 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.3'), ('value', '\x0c%*.eu-central-1.snowflakecomputing.com')])]])])
2020-06-25 10:33:43,203 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,213 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.11'), ('value', '\x13\x0cServer CA 1B')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x06Amazon')])]])])
2020-06-25 10:33:43,255 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,266 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x10Amazon Root CA 1')])]])])
2020-06-25 10:33:43,315 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,323 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.8'), ('value', '\x13\x07Arizona')])], [OrderedDict([('type', '2.5.4.7'), ('value', '\x13\nScottsdale')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x1cStarfield Technologies, Inc.')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x132Starfield Services Root Certificate Authority - G2')])]])])
2020-06-25 10:33:43,355 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.3'), ('value', '\x0c%*.eu-central-1.snowflakecomputing.com')])]])])
2020-06-25 10:33:43,361 - MainThread ocsp_snowflake.py:1124 - validate_by_direct_connection() - DEBUG - using OCSP response cache
2020-06-25 10:33:43,365 - MainThread ocsp_pyasn1.py:493 - process_ocsp_response() - DEBUG - Certificate is NOT attached in Basic OCSP Response. Using issuer's certificate
2020-06-25 10:33:43,365 - MainThread ocsp_pyasn1.py:500 - process_ocsp_response() - DEBUG - Verifying the OCSP response is signed by the issuer.
2020-06-25 10:33:43,480 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,487 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.11'), ('value', '\x13\x0cServer CA 1B')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x06Amazon')])]])])
2020-06-25 10:33:43,492 - MainThread ocsp_snowflake.py:1124 - validate_by_direct_connection() - DEBUG - using OCSP response cache
2020-06-25 10:33:43,509 - MainThread ocsp_pyasn1.py:466 - process_ocsp_response() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,582 - MainThread ocsp_pyasn1.py:500 - process_ocsp_response() - DEBUG - Verifying the OCSP response is signed by the issuer.
2020-06-25 10:33:43,694 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,704 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x06Amazon')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x13\x10Amazon Root CA 1')])]])])
2020-06-25 10:33:43,707 - MainThread ocsp_snowflake.py:1124 - validate_by_direct_connection() - DEBUG - using OCSP response cache
2020-06-25 10:33:43,727 - MainThread ocsp_pyasn1.py:466 - process_ocsp_response() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,799 - MainThread ocsp_pyasn1.py:500 - process_ocsp_response() - DEBUG - Verifying the OCSP response is signed by the issuer.
2020-06-25 10:33:43,907 - MainThread ocsp_pyasn1.py:399 - is_valid_time() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:43,917 - MainThread ocsp_snowflake.py:588 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('', [[OrderedDict([('type', '2.5.4.6'), ('value', '\x13\x02US')])], [OrderedDict([('type', '2.5.4.8'), ('value', '\x13\x07Arizona')])], [OrderedDict([('type', '2.5.4.7'), ('value', '\x13\nScottsdale')])], [OrderedDict([('type', '2.5.4.10'), ('value', '\x13\x1cStarfield Technologies, Inc.')])], [OrderedDict([('type', '2.5.4.3'), ('value', '\x132Starfield Services Root Certificate Authority - G2')])]])])
2020-06-25 10:33:43,921 - MainThread ocsp_snowflake.py:1124 - validate_by_direct_connection() - DEBUG - using OCSP response cache
2020-06-25 10:33:43,946 - MainThread ocsp_pyasn1.py:466 - process_ocsp_response() - DEBUG - Certificate is attached in Basic OCSP Response
2020-06-25 10:33:44,016 - MainThread ocsp_pyasn1.py:500 - process_ocsp_response() - DEBUG - Verifying the OCSP response is signed by the issuer.
2020-06-25 10:33:44,107 - MainThread ocsp_snowflake.py:522 - write_ocsp_response_cache_file() - DEBUG - writing OCSP response cache file
2020-06-25 10:33:44,107 - MainThread ocsp_snowflake.py:1518 - encode_ocsp_response_cache() - DEBUG - encoding OCSP response cache to JSON
2020-06-25 10:33:44,339 - MainThread ocsp_snowflake.py:1015 - _validate() - DEBUG - ok
2020-06-25 10:33:44,604 - MainThread network.py:808 - _request_exec() - DEBUG - SUCCESS
2020-06-25 10:33:44,604 - MainThread network.py:953 - _use_requests_session() - DEBUG - Active requests sessions: 0, idle: 1
2020-06-25 10:33:44,604 - MainThread network.py:536 - _post_request() - DEBUG - ret[code] = 390142, after post request
2020-06-25 10:33:44,604 - MainThread auth.py:288 - authenticate() - DEBUG - completed authentication
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2019.2\plugins\python\helpers\pydev\pydevd.py", line 1434, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:/workspace/rivery_back/sandbox/aaa.py", line 44, in <module>
    application='Rivery')
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\__init__.py", line 33, in Connect
    return SnowflakeConnection(**kwargs)
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\connection.py", line 187, in __init__
    self.connect(**kwargs)
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\connection.py", line 484, in connect
    self.__open_connection()
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\connection.py", line 702, in __open_connection
    self.__authenticate(auth_instance)
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\connection.py", line 933, in __authenticate
    session_parameters=self._session_parameters,
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\auth.py", line 308, in authenticate
    u'sqlstate': SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED,
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\errors.py", line 100, in errorhandler_wrapper
    connection.errorhandler(connection, cursor, errorclass, errorvalue)
  File "C:\workspace\python_env\rivery_back\lib\site-packages\snowflake\connector\errors.py", line 73, in default_errorhandler
    done_format_msg=errorvalue.get(u'done_format_msg'))
snowflake.connector.errors.DatabaseError: 250001 (08001): None: Failed to connect to DB: zn19366.eu-central-1.snowflakecomputing.com:443. Incoming request does not contain a valid payload.

The error sometimes happens and sometimes not, and it seems it doesn't work on "debug" but works constantly on run mode.

github-actions[bot] commented 1 year ago

To clean up and re-prioritize bugs and feature requests we are closing all issues older than 6 months as of March 1, 2023. If there are any issues or feature requests that you would like us to address, please re-create them. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response