Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Anchor
encryptedkeypair
encryptedkeypair
Failed to load the private key based on <PRIVATE KEY>

This error generated by the com.cirruslink.ingest.snowflake.StreamingIngest logger indicates that the private/public key pair for snowflake connection is encrypted.

Note
The key pair must be unencrypted 

You will also see a stack trace similar to the one below:

Code Block
INFO|174123/0||23-06-15 14:20:36|java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DER input, Integer tag error 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:251) 
INFO|174123/0||23-06-15 14:20:36| at java.base/java.security.KeyFactory.generatePrivate(KeyFactory.java:390) 
INFO|174123/0||23-06-15 14:20:36| at net.snowflake.ingest.internal.apache.kerby.kerberos.kerb.common.PrivateKeyReader.loadPrivateKey(PrivateKeyReader.java:62) 
INFO|174123/0||23-06-15 14:20:36| at com.cirruslink.iotbridge.snowflake.StreamingIngest.<init>(StreamingIngest.java:77) 
INFO|174123/0||23-06-15 14:20:36| at com.cirruslink.iotbridge.snowflake.SnowflakeHostApplication.<init>(SnowflakeHostApplication.java:82) 
INFO|174123/0||23-06-15 14:20:36| at com.cirruslink.iotbridge.snowflake.SnowflakeIotBridge.<init>(SnowflakeIotBridge.java:34) 
INFO|174123/0||23-06-15 14:20:36| at com.cirruslink.iotbridge.snowflake.SnowflakeIotBridge.main(SnowflakeIotBridge.java:21) 
INFO|174123/0||23-06-15 14:20:36| at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
INFO|174123/0||23-06-15 14:20:36| at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
INFO|174123/0||23-06-15 14:20:36| at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
INFO|174123/0||23-06-15 14:20:36| at java.base/java.lang.reflect.Method.invoke(Method.java:566) 
INFO|174123/0||23-06-15 14:20:36| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60) 
INFO|174123/0||23-06-15 14:20:36| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43) 
INFO|174123/0||23-06-15 14:20:36|Caused by: java.security.InvalidKeyException: IOException : DER input, Integer tag error 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:350) 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:355) 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.<init>(RSAPrivateCrtKeyImpl.java:136) 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.newKey(RSAPrivateCrtKeyImpl.java:80) 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.rsa.RSAKeyFactory.generatePrivate(RSAKeyFactory.java:356) 
INFO|174123/0||23-06-15 14:20:36| at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:247) 
INFO|174123/0||23-06-15 14:20:36| ... 12 common frames omitted 
INFO|174123/0||23-06-15 14:20:36|14:20:36.004 [main] ERROR c.c.i.snowflake.StreamingIngest - Failed to load the private key based on <PRIVATE_KEY>


Anchor
400BadRequest
400BadRequest
400 Bad Request

This 400 Bad Request is returned from the Snowflake Streaming endpoint when using the URL configured in your snowflake_streaming_profile.json configuration.

This can be caused by a number of configuration errors:

  1. The URL is incorrect or malformed
  2. The user and role are mismatched or incorrect
     
Code Block
INFO|69731/0||24-04-04 20:48:33|20:48:33.243 [main] INFO  n.s.i.connection.SecurityManager - Successfully created new JWT
INFO|69731/0||24-04-04 20:48:33|20:48:33.245 [main] INFO  n.s.ingest.connection.RequestBuilder - Creating a RequestBuilder with arguments : Account : FU08711, User : IBSNOW_INGEST, Scheme : https, Host : fu08711.east-us-2.azure.snowflakecomputing.com, Port : 443, userAgentSuffix: null
INFO|69731/0||24-04-04 20:48:33|20:48:33.245 [main] INFO  n.s.i.s.i.SnowflakeStreamingIngestClientInternal - [SF_INGEST] Using KEYPAIR_JWT for authorization
INFO|69731/0||24-04-04 20:48:33|20:48:33.261 [main] INFO  n.s.i.s.i.StreamingIngestStage - [SF_INGEST] Refresh Snowflake metadata, client=IBSNOWClient
INFO|69731/0||24-04-04 20:48:33|20:48:33.780 [main] WARN  n.s.i.c.ServiceResponseHandler - 400 Status hit from STREAMING_CLIENT_CONFIGURE, requestId:
INFO|69731/0||24-04-04 20:48:33|20:48:33.862 [main] ERROR c.c.i.snowflake.StreamingIngest - Failed to open the channel for IBSNOW_BridgeInfo
INFO|69731/0||24-04-04 20:48:33|20:48:33.864 [main] ERROR c.c.i.snowflake.StreamingIngest - Failed to insert on topic 'spBv1.0/IBSNOW/NBIRTH/Bridge Info'
INFO|69731/0||24-04-04 20:48:33|java.lang.NullPointerException: null
INFO|69731/0||24-04-04 20:48:33|        at com.cirruslink.iotbridge.snowflake.StreamingIngest.insert(StreamingIngest.java:136)