snowflake snowsql error 250003 (n/a): Failed to get the response. Hanging?

Viewed 2138

first timer so be gentle

i am having difficulties connecting to snowflake in c# and via snowsql on my development machine

i can connect to snowflake via a .net framework console project. conn.open works.

i can't connect via a .net core 3.1 or .net 5 console project. conn.open hangs.

exactly the same code as the .net framework that works. in both cases i'm using the Snowflake.Data nuget.

i then downloaded and tried snowsql and got the error:

250003 (n/a): Failed to get the response. Hanging? method: post, url: https://...

the exact same snowsql command works on a different box.

i've taken a look in snowsql_rt.log and there are some errors that i'm trying to understand. i wonder if snowsql uses python behind the scenes based on the .py files.

2021-06-02 11:58:03,579 (11792/MainThread) snowflake.cli.common.util_cli DEBUG       util_cli:645  - Initialized logging. Log file ' xxx /.snowsql/snowsql_rt.log', Namespaces: ['snowflake.cli', 'snowflake.connector', 'botocore', 'azure', '__main__', 'eventloop', 'sqlexecute']
2021-06-02 11:58:03,580 (11792/MainThread) snowflake.cli.common.util_cli INFO       util_cli:681  - REQUESTS_CA_BUNDLE is already set to C:\Users\xxx\AppData\Local\Temp\_MEI277642\certifi\cacert.pem
2021-06-02 11:58:03,581 (11792/MainThread) __main__ DEBUG      eventloop:209  - is_terminal: True, is_interactive: True
2021-06-02 11:58:03,582 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:163  - starting sqlexecute
2021-06-02 11:58:03,583 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: C:\Users\xxx\.snowsql\1.2.14\snowsql.cnf
2021-06-02 11:58:03,584 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: /etc/snowsql.cnf
2021-06-02 11:58:03,585 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: /etc/snowflake/snowsql.cnf
2021-06-02 11:58:03,585 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: /usr/local/etc/snowsql.cnf
2021-06-02 11:58:03,586 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: C:\Users\xxx\.snowsql.cnf
2021-06-02 11:58:03,587 (11792/MainThread) snowflake.cli.common.config DEBUG         config:85   - Reading cnf: C:\Users\xxx\.snowsql\config
2021-06-02 11:58:03,589 (11792/MainThread) __main__ DEBUG      eventloop:353  - [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]
2021-06-02 11:58:03,589 (11792/MainThread) __main__ DEBUG      eventloop:359  - fallback to config values only if user did not specify a value and sqlexecute is connecting for the first time.
2021-06-02 11:58:03,590 (11792/MainThread) __main__ DEBUG      eventloop:407  - host=None, port: + None
2021-06-02 11:58:03,590 (11792/MainThread) __main__ DEBUG      eventloop:446  - prompting user, password and account if still missing
2021-06-02 11:58:03,590 (11792/MainThread) __main__ DEBUG      eventloop:501  - init sqlexecute
2021-06-02 11:58:03,591 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:254  - Connection DB Params: database: xxx, warehouse: COMPUTE_WH, user: xxx, host: xxx, port: 443, region: None, account:xxx, protocol: https, schema: xxx, role: None, ocsp_fail_open: True, insecure_mode: None, proxy_host: None, proxy_port: None, proxy_user: None, authenticator: SNOWFLAKE, session_parameters: {'ABORT_DETACHED_QUERY': False}, login_timeout: 120, client_session_keep_alive: False, disable_request_pooling: None, client_store_temporary_credential: None
2021-06-02 11:58:03,592 (11792/MainThread) snowflake.connector.connection INFO     connection:222  - Snowflake Connector for Python Version: 2.4.1, Python Version: 3.6.8, Platform: Windows-10-10.0.19041-SP0
2021-06-02 11:58:03,592 (11792/MainThread) snowflake.connector.connection DEBUG     connection:421  - connect
2021-06-02 11:58:03,592 (11792/MainThread) snowflake.connector.connection DEBUG     connection:656  - __config
2021-06-02 11:58:03,593 (11792/MainThread) snowflake.connector.connection INFO     connection:774  - 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.
2021-06-02 11:58:03,593 (11792/MainThread) snowflake.connector.connection INFO     connection:790  - Setting use_openssl_only mode to False
2021-06-02 11:58:03,594 (11792/MainThread) snowflake.connector.converter DEBUG      converter:135  - use_numpy: False
2021-06-02 11:58:03,595 (11792/MainThread) snowflake.connector.connection DEBUG     connection:572  - REST API object was created: xxx:443
2021-06-02 11:58:03,595 (11792/MainThread) snowflake.connector.auth DEBUG           auth:129  - authenticate
2021-06-02 11:58:03,595 (11792/MainThread) snowflake.connector.auth DEBUG           auth:157  - assertion content: *********
2021-06-02 11:58:03,596 (11792/MainThread) snowflake.connector.auth DEBUG           auth:169  - account=xxx, user=xxx, database=xxx, schema=xxx, warehouse=COMPUTE_WH, role=None, request_id=xx
2021-06-02 11:58:03,596 (11792/MainThread) snowflake.connector.auth DEBUG           auth:195  - body['data']: {'CLIENT_APP_ID': 'SnowSQL', 'CLIENT_APP_VERSION': '1.2.14', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'xxx', 'LOGIN_NAME': 'xxx', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'SnowSQL', 'OS': 'Windows', 'OS_VERSION': 'Windows-10-10.0.19041-SP0', 'PYTHON_VERSION': '3.6.8', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'MSC v.1916 64 bit (AMD64)', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': 120, 'NETWORK_TIMEOUT': None}, 'SESSION_PARAMETERS': {'ABORT_DETACHED_QUERY': False, 'AUTOCOMMIT': True, 'CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY': 900, 'CLIENT_PREFETCH_THREADS': 4}}
2021-06-02 11:58:03,598 (11792/MainThread) snowflake.connector.vendored.urllib3.util.retry DEBUG          retry:230  - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2021-06-02 11:58:03,598 (11792/MainThread) snowflake.connector.vendored.urllib3.util.retry DEBUG          retry:230  - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2021-06-02 11:58:03,598 (11792/MainThread) snowflake.connector.network DEBUG        network:951  - Active requests sessions: 1, idle: 0
2021-06-02 11:58:03,599 (11792/MainThread) snowflake.connector.network DEBUG        network:651  - remaining request timeout: 120, retry cnt: 1
2021-06-02 11:58:03,599 (11792/MainThread) snowflake.connector.network DEBUG        network:638  - Request guid: xxx
2021-06-02 11:58:03,600 (11792/MainThread) snowflake.connector.network DEBUG        network:794  - socket timeout: 60
2021-06-02 11:58:03,604 (11792/MainThread) snowflake.connector.vendored.urllib3.connectionpool DEBUG connectionpool:943  - Starting new HTTPS connection (1): xxx:443
2021-06-02 11:58:03,902 (11792/MainThread) snowflake.connector.vendored.urllib3.util.retry DEBUG          retry:441  - Incremented Retry for (url='xxx): Retry(total=0, connect=None, read=None, redirect=None, status=None)
2021-06-02 11:58:03,903 (11792/MainThread) snowflake.connector.vendored.urllib3.connectionpool WARNING connectionpool:752  - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)': xxx
2021-06-02 11:58:03,905 (11792/MainThread) snowflake.connector.vendored.urllib3.connectionpool DEBUG connectionpool:943  - Starting new HTTPS connection (2): xxx:443
2021-06-02 11:58:04,097 (11792/MainThread) snowflake.connector.network DEBUG        network:883  - Hit non-retryable SSL error, HTTPSConnectionPool(host='xxx.snowflakecomputing.com', port=443): Max retries exceeded with url: xxx (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
2021-06-02 11:58:04,108 (11792/MainThread) snowflake.connector.network ERROR        network:766  - Failed to get the response. Hanging? method: post, url: xxx
2021-06-02 11:58:04,121 (11792/MainThread) snowflake.connector.network DEBUG        network:964  - Active requests sessions: 0, idle: 1
2021-06-02 11:58:04,121 (11792/MainThread) __main__ ERROR      eventloop:547  - Database connection failed: 250003: 250003: Failed to get the response. Hanging? method: post, url: xxx
Traceback (most recent call last):
  File "cli\eventloop.py", line 540, in connect
  File "lib\site-packages\snowflake\cli\sqlexecute.py", line 291, in push_connection
  File "lib\site-packages\snowflake\connector\__init__.py", line 50, in Connect
  File "lib\site-packages\snowflake\connector\connection.py", line 232, in __init__
  File "lib\site-packages\snowflake\connector\connection.py", line 426, in connect
  File "lib\site-packages\snowflake\connector\connection.py", line 638, in __open_connection
  File "lib\site-packages\snowflake\connector\connection.py", line 875, in _authenticate
  File "lib\site-packages\snowflake\connector\connection.py", line 905, in __authenticate
  File "lib\site-packages\snowflake\connector\auth.py", line 201, in authenticate
  File "lib\site-packages\snowflake\connector\network.py", line 544, in _post_request
  File "lib\site-packages\snowflake\connector\network.py", line 624, in fetch
  File "lib\site-packages\snowflake\connector\network.py", line 733, in _request_exec_wrapper
  File "lib\site-packages\snowflake\connector\network.py", line 668, in _request_exec_wrapper
  File "lib\site-packages\snowflake\connector\network.py", line 777, in _handle_unknown_error
  File "lib\site-packages\snowflake\connector\errors.py", line 239, in errorhandler_wrapper
  File "lib\site-packages\snowflake\connector\errors.py", line 176, in default_errorhandler
snowflake.connector.errors.OperationalError: 250003: 250003: Failed to get the response. Hanging? method: post, url: xxx
2021-06-02 11:58:04,132 (11792/MainThread) __main__ INFO      eventloop:567  - rollback
2021-06-02 11:58:04,133 (11792/MainThread) snowflake.cli.sqlexecute INFO     sqlexecute:363  - rollback
2021-06-02 11:58:04,134 (11792/MainThread) __main__ ERROR      eventloop:1237 - 250003: 250003: Failed to get the response. Hanging? method: post, url: xxx
Traceback (most recent call last):
  File "cli\eventloop.py", line 1172, in cli
  File "cli\eventloop.py", line 554, in connect
  File "cli\eventloop.py", line 540, in connect
  File "lib\site-packages\snowflake\cli\sqlexecute.py", line 291, in push_connection
  File "lib\site-packages\snowflake\connector\__init__.py", line 50, in Connect
  File "lib\site-packages\snowflake\connector\connection.py", line 232, in __init__
  File "lib\site-packages\snowflake\connector\connection.py", line 426, in connect
  File "lib\site-packages\snowflake\connector\connection.py", line 638, in __open_connection
  File "lib\site-packages\snowflake\connector\connection.py", line 875, in _authenticate
  File "lib\site-packages\snowflake\connector\connection.py", line 905, in __authenticate
  File "lib\site-packages\snowflake\connector\auth.py", line 201, in authenticate
  File "lib\site-packages\snowflake\connector\network.py", line 544, in _post_request
  File "lib\site-packages\snowflake\connector\network.py", line 624, in fetch
  File "lib\site-packages\snowflake\connector\network.py", line 733, in _request_exec_wrapper
  File "lib\site-packages\snowflake\connector\network.py", line 668, in _request_exec_wrapper
  File "lib\site-packages\snowflake\connector\network.py", line 777, in _handle_unknown_error
  File "lib\site-packages\snowflake\connector\errors.py", line 239, in errorhandler_wrapper
  File "lib\site-packages\snowflake\connector\errors.py", line 176, in default_errorhandler
snowflake.connector.errors.OperationalError: 250003: 250003: Failed to get the response. Hanging? method: post, url: xxx
2021-06-02 11:58:04,147 (11792/MainThread) __main__ DEBUG      eventloop:581  - closing sessions
2021-06-02 11:58:04,148 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:344  - closing connections
2021-06-02 11:58:04,148 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:311  - joining async exec
2021-06-02 11:58:04,148 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:319  - waiting for async exec to finish...
2021-06-02 11:58:04,149 (11792/MainThread) snowflake.cli.sqlexecute DEBUG     sqlexecute:336  - all async queries finished.
2021-06-02 11:58:04,181 (11792/MainThread) snowflake.connector.connection INFO     connection:441  - closed
2021-06-02 11:58:04,185 (11792/MainThread) snowflake.connector.connection DEBUG     connection:455  - Exception encountered in closing connection. ignoring...: 'SnowflakeConnection' object has no attribute '_telemetry'

the fact it works using .net framework makes me think that its not a port, firewall or proxy type issue. and so i'm thinking python is my problem?

any advice or pointers would be greatly appreciated.

first timer so be gentle

0 Answers
Related