Summary
After upgrading to Liquibase Secure 6.0.2 or later, runs against Snowflake can log a burst of SEVERE messages from net.snowflake.client.internal.jdbc.RestRequest (HTTP 401 responses, UnknownHostException, Network is unreachable), even though the job completes successfully.
These messages are harmless. They come from the Snowflake JDBC driver bundled with Liquibase, not from Liquibase itself, and they can be suppressed by setting SNOWFLAKE_DISABLE_PLATFORM_DETECTION=true.
Applies to
- Liquibase Secure (Pro) 6.0.2 and later.
- Snowflake connections made through the bundled Snowflake JDBC driver.
Symptoms
After upgrading from an earlier version, the Liquibase log shows many SEVERE entries when connecting to Snowflake, including:
SEVERE [net.snowflake.client.internal.jdbc.RestRequest] Error executing request: GET http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com HTTP/1.1 SEVERE [net.snowflake.client.internal.jdbc.RestRequest] Response status line reason: Unauthorized SEVERE [net.snowflake.client.internal.jdbc.RestRequest] - Error response: HTTP Response code: 401, request: GET http://169.254.169.254/metadata/instance?api-version=2021-02-01 HTTP/1.1 SEVERE [net.snowflake.client.internal.jdbc.RestRequest] Stop retrying since elapsed time due to network issues has reached timeout. Elapsed: 1,009 ms, timeout: 1,000 ms SEVERE [net.snowflake.client.internal.jdbc.RestRequest] - Returning null response. Cause: java.net.UnknownHostException: metadata.google.internal, request: GET http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email HTTP/1.1 SEVERE [net.snowflake.client.internal.jdbc.RestRequest] - Returning null response. Cause: java.net.SocketException: Network is unreachable, request: PUT http://[fd00:ec2::254]/latest/api/token HTTP/1.1
The requests target well-known cloud metadata addresses (for example 169.254.169.254, metadata.google.internal, and [fd00:ec2::254]). Despite the errors:
- The job completes successfully.
- The connection to Snowflake succeeds, including when using OAuth client credentials.
- Policy checks and other commands run normally, and the license key is recognized as valid.
Root Cause
Liquibase Secure 6.0.2 updated the bundled Snowflake JDBC driver to 4.4.0. The newer driver includes a platform detection check that the older driver did not have. When it connects, the driver tries a few well-known metadata endpoints to find out whether it is running on AWS, Azure, or Google Cloud.
In an environment that doesn't respond to those checks the way the driver expects, each probe fails (a 401, a DNS failure, an unreachable network, or the driver's 1,000 ms timeout) and the driver logs it as SEVERE. The probes don't affect authentication or the deployment, and the messages are not a security vulnerability.
Resolution
Disable the Snowflake driver's platform detection. Either of the following works however Liquibase is run in your pipeline.
- Set the environment variable
SNOWFLAKE_DISABLE_PLATFORM_DETECTION=truein the environment of the Liquibase process, using whatever method your pipeline uses to set environment variables. The value has to be exactlytrue. - Or add
&disablePlatformDetection=trueto the end of your Snowflake JDBC URL.
After making the change, rerun the job and confirm the SEVERE messages are gone.
Running Liquibase in Docker
The environment variable has to reach the container. A workflow step's env: block doesn't pass into the container, so add the variable to the docker run command with -e instead:
docker run --rm \
-v "$GITHUB_WORKSPACE:${{ env.WORK_DIR }}" \
-w ${{ env.WORK_DIR }} \
-e SNOWFLAKE_DISABLE_PLATFORM_DETECTION=true \
-e LIQUIBASE_COMMAND_URL="${{ env.SNOWFLAKE_URL }}" \
...
Comments
0 comments
Article is closed for comments.