Has anyone encountered a jdbc Oauth2 connection be...
# replication-troubleshooting
j
Has anyone encountered a jdbc Oauth2 connection being unavailable when it is writing to the destination (Snowflake)? It seems to get the refreshToken successfully (though I never see the log line output for that, just the log line that it started that process). The connection works and I can see the refresh toklen response with an addtl log line I added. airbyte: 0.41.0 destination-snowflake: 0.4.49
The resresh token repsonse:
Copy code
{
schema=RAW
queryTimeout=10800
role=<redacted>
client_id=<redacted>
database=<redacted>
host=<redacted>
MULTI_STATEMENT_COUNT=0
client_secret=<redacted>
authenticator=oauth
JDBC_QUERY_RESULT_FORMAT=JSON
warehouse=<redacted>
token=ver:<redacted>
networkTimeout=60
refresh_token=<redacted>
application=airbyte_oss
username=myusername
}
e
j
Sucks, but not the same kind of error
n
Hey Jeff! Could you double check that your variable names are uppercase?
j
@Nataly Merezhuk (Airbyte) Thanks for getting back to me!
Did some addtl diving into the code and it seems that there is an exception that falls through in the refresh token runnable
I had to edit the destination-snowflake connector, add some logging, and run it locally to figure it out
This line throws an IllegalStateException that isn’t caught:
Copy code
2023-03-02 20:44:31 destination > ERROR i.a.i.d.s.SnowflakeDatabase(lambda$getRefreshTokenTask$1):250 JJ failed to get accestoken: java.lang.IllegalStateException: The configuration of the pool is sealed once started. Use HikariConfigMXBean for runtime changes.
trying to set the connection properties after its launched causes the runnable to never complete
I commented it out after validating the datasource’s properties actually get amended with the new accessToken, and currently waiting for the sync to complete to see if it works
With debug on I can see that the snowflake jdbc connection is still in the pool, but until I found this I wasn’t sure why it was unavailable at flush time
I know that the tokens work because the normalized tables and staging tables all get created successfully
Also if the sync is quick then it completes successfully and writes the data to snowflake. Its only when its relatively longer than the accessToken is valid
10mins for snowflake
@Nataly Merezhuk (Airbyte) nvm still throwing the expired accesstoken error. Even with successfully obtaining a new one just prior
Looks like this error I am having with Oauth is a retry loop never getting to refresh the token and just failing
This issue explains the behavior pretty well: https://github.com/airbytehq/airbyte/issues/13660
Although I don’t get a 401 or similar from Snowflake, just that the token has expired
n
Thanks for linking that issue and commenting on it. It would be really helpful if you could raise a new issue specific to the Snowflake connector and include any/all information you've posted so far!
j
Will do!