SnowCD – Connectivity Diagnostic Tool
When setting up complex network architectures—like deploying Snowflake on a corporate VPN with strict firewalls, or establishing AWS PrivateLink—things rarely work perfectly on the first try.
SnowCD (Snowflake Connectivity Diagnostic Tool) is a command-line utility provided by Snowflake specifically designed to troubleshoot and verify network connections from your client machine to your Snowflake account.
Topics Covered
- What SnowCD is and when to use it
- Installing and running SnowCD
- Interpreting Connectivity Test Results
- Diagnosing PrivateLink vs Public Connectivity
When to use SnowCD?
If a data engineer or BI analyst reports any of the following errors, you should immediately run SnowCD on their machine (or the server hosting the application):
- "Cannot connect to Snowflake"
- "Connection timed out"
- "OCSP Revocation Check Failed"
- "Failed to reach internal stage during COPY INTO"
SnowCD runs a series of DNS resolutions, HTTP/HTTPS connectivity checks, and certificate validation checks against all the required URLs Snowflake needs to operate.
Hands-On Demonstration: Running SnowCD
Let's assume our Network Engineer, Vikram Singh from the Chandigarh office, is setting up a new dbt server and cannot connect to Snowflake. He will use SnowCD to diagnose the issue.
1. Generate the Whitelist (Database Setup)
Before Vikram can run SnowCD, a Snowflake administrator needs to provide him with the list of URLs his specific Snowflake account requires.
(To ensure you have the required privileges to generate this list, check your current user by running SELECT CURRENT_USER();)
USE ROLE ACCOUNTADMIN;
-- If verifying standard public internet connectivity
SELECT SYSTEM$WHITELIST();
-- If verifying PrivateLink / Private Connectivity
SELECT SYSTEM$WHITELIST_PRIVATELINK();
The output is a large JSON string containing various endpoints (the main account URL, OCSP certificate servers, and AWS/Azure/GCP internal stage URLs used for data loading).
Save this JSON output to a file named whitelist.json.
2. Install and Run SnowCD (Simulated)
Vikram downloads the SnowCD binary for his OS (Linux/Windows/Mac) from the official Snowflake repository. He moves the whitelist.json file to the same directory and runs the tool.
# Vikram runs this on the dbt server
./snowcd whitelist.json
3. Interpreting the Results
SnowCD will output a log of checks.
Scenario A: Success
Performing 25 checks...
All checks passed.
If you see this, the network is perfect. The connection issue is likely bad credentials or a typo in the account identifier.
Scenario B: Firewall Blocking OCSP
Performing 25 checks...
Check failed: ocsp.snowflakecomputing.com:80 - timeout
Diagnosis: Snowflake drivers use OCSP (Online Certificate Status Protocol) to verify that SSL certificates haven't been revoked. The corporate firewall is blocking port 80 (HTTP) to the OCSP server. Remediation: Ask the network team to whitelist the OCSP URLs provided in the JSON file.
Scenario C: Internal Stage Failure
Performing 25 checks...
Check failed: s3.us-west-2.amazonaws.com:443 - connection refused
Diagnosis: While Vikram can connect to the main Snowflake URL, he cannot reach the AWS S3 bucket that Snowflake uses for internal staging. He will be able to run SELECT queries, but PUT or COPY INTO commands will hang and fail.
Remediation: Update the firewall or proxy to allow traffic to the S3/Azure/GCS blob storage URLs listed in the whitelist.
Diagnosing PrivateLink Issues
When testing PrivateLink, the most common SnowCD failure is a DNS Resolution Error.
When using SYSTEM$WHITELIST_PRIVATELINK(), the URLs look like *.privatelink.snowflakecomputing.com. If SnowCD fails to resolve these, it means the corporate DNS server has not been updated to route these specific URLs to the private IP address of the VPC Endpoint.
Until DNS is fixed, SnowCD will fail, and traffic will try to route over the public internet (and subsequently be blocked by your Network Policies).
Summary
- SnowCD diagnoses network issues between a client machine and Snowflake.
- Use
SYSTEM$WHITELIST()to generate the JSON configuration file containing your account's specific required URLs. - It tests DNS, HTTP/HTTPS connectivity, and OCSP certificate validation.
- It is essential for troubleshooting corporate firewall blocks and PrivateLink deployments.