Open amkartashov opened 1 year ago
Similar issue happened to me as well.
Would it make sense to set CLIENT_SESSION_KEEP_ALIVE = true
for the connector user?
@amkartashov which version of connector is this? I couldn't find the message of "Authentication token has expired. The user must authenticate again." in the latest code
@sfc-gh-tzhang For me, it happened with version 1.6.9
@sfc-gh-tzhang which is the recommended version to use according to the documentation: https://docs.snowflake.com/en/user-guide/kafka-connector-install.html#installing-the-connector
@amkartashov which version of connector is this? I couldn't find the message of "Authentication token has expired. The user must authenticate again." in the latest code
@sfc-gh-tzhang it's 1.8.0
Error message comes from snowflake jdbc driver, and they suggest to set session parameter to fix this, but there is no way to do this with kafka connector because it accepts bare url only, w/o any parameters. See https://github.com/snowflakedb/snowflake-jdbc/issues/182 f.e.
Thanks, looks like the error is actually from Snowflake server side instead of JDBC. For the fix, we could support reading it from the config file and instruct this code to accept it as a property.
@sfc-gh-tzhang
I see below possible options:
snowflake.connection.properties
- same place where we have snowflake.url.name
Current w/a from snowflake support is to set this setting on snowflake side: ALTER USER [user_name] SET CLIENT_SESSION_KEEP_ALIVE = true
@sfc-gh-tzhang could we close this issue now?
Snowflake connector does not accept connection properties in snowflake URL: https://github.com/snowflakedb/snowflake-kafka-connector/blob/4d358495ea172244ede28c42c39fb20b559f1fad/src/main/java/com/snowflake/kafka/connector/internal/SnowflakeURL.java#L53
We need to be able to pass CLIENT_SESSION_KEEP_ALIVE set to true. Without this settings connector fails with (after connection is idle for a few hours):