snowflake-kafka-connector
snowflake-kafka-connector copied to clipboard
JDBC error no Connect retry.
Hi,
I have a bug/question. I have a connector running for a week. (Not constantly sending data, but periodically.)
After a week my connector failed with the error:
[SF_KAFKA_CONNECTOR] Detail: Error in cached put command [SF_KAFKA_CONNECTOR] Message: JDBC driver encountered IO error. Message: Encountered exception during upload: null. 2022-02-19T22:58:21,863 [task-thread-snowflake_sink_json_2-test-0] [0] [task] WARN c.s.k.c.i.SnowflakeInternalStage - uploadWithoutConnection encountered an exception:JDBC driver encountered IO error. Message: Encountered exception during upload: null. for filePath:XXXXXXXXX/YYYYYYYY/1/ZZZZZZZZZ.json.gz in Storage:AZURE 2022-02-19T22:58:21,863 [task-thread-snowflake_sink_json_2-test-0] [0] [task] ERROR c.s.k.c.internal.InternalUtils - Retry count:4 caught an exception for operation:UPLOAD_FILE_TO_INTERNAL_STAGE_NO_CONNECTION with message: [SF_KAFKA_CONNECTOR] Exception: Failed to execute cached put [SF_KAFKA_CONNECTOR] Error Code: 5018 [SF_KAFKA_CONNECTOR] Detail: Error in cached put command
That error comes from the JDBC driver. (That driver is configured with 3 retries 1,3,8 seconds apart.
I am on Azure with Snowflake also running on Azure. I find this an issue with Azure/Snowflake.
Is there a way that I can get this to retry after a longer timeout? Standard Kafka Connectors have the settings:
errors.retry.timeout The maximum duration in milliseconds that a failed operation will be reattempted. The default is 0, which means no retries will be attempted. Use -1 for infinite retries.
Type: long Default: 0 Valid Values: Importance: medium
errors.retry.delay.max.ms The maximum duration in milliseconds between consecutive retry attempts. Jitter will be added to the delay once this limit is reached to prevent thundering herd issues.
Type: long Default: 60000 (1 minute) Valid Values: Importance: medium
Those settings do not run as you do not throw a retriable exception. Thus I can not configure my Connect to auto retry because of the fact that the error which is thrown is not retriable.
Questions: How can I fix this?
-
Can I change the code and make the exception retriable?
-
With an Azure / your environment error - is there something else that I can try?
If this is open source I do not mind making changes.
Just another data point, I am also noticing this error happening also after about a week.
Retry count:0 caught an exception for operation:UPLOAD_FILE_TO_INTERNAL_STAGE_NO_CONNECTION with message:
[SF_KAFKA_CONNECTOR] Exception: Failed to execute cached put
[SF_KAFKA_CONNECTOR] Error Code: 5018
[SF_KAFKA_CONNECTOR] Detail: Error in cached put command
@Pugde5 Yes, feel free to make a change and send out a PR, we will have someone reviews the change on our side
Closing this issue out due to age - please reopen if a PR is ready or further discussion is needed.