Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RDS datasource failed with error: Token refresh started before session initialized. #4145

Closed
vhnguyenae opened this issue Feb 23, 2024 · 5 comments
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.

Comments

@vhnguyenae
Copy link

My Environment

  • OS: MacOs 13.4 , Macbook M2 Pro
  • JetBrains product: IntelliJ IDEA (Ultimate Edition)
  • JetBrains product version: 2023.3.4
  • AWS Toolkit version: 2.9-233
  • AWS Aurora MySQL driver is 1.1.9
  • SAM CLI version: Not installed
  • JVM/Python version: OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9, Python 3.11

Question
I failed to setup a Datasource for Amazon Aurora MySQL with the error below:
"Token refresh started before session initialized."
Google search doesn't give back much result that is related 😅
I'm not sure about the field Secret Name/ARN though. What's the correct syntax ?

  • SecretName SecretARN (with a space in between secret name and ARN)
  • only secret Name (or ARN is enough)
    Anyway, I tried all 3 possibles syntax but I still got the same error

I also tried to to specify the version 2.11.4 (which is from the Engine version of my RDS Aurora) but still get the same error.

Does anyone encounter the same issue before? How can I fix this?
Thanks in advance for your help.

image
@vhnguyenae vhnguyenae added the guidance General information and guidance, answers to FAQs, or recommended best practices/resources. label Feb 23, 2024
@moduspwnens
Copy link

I'm new to DataGrip, but I think I just ran into and solved this issue on my end.

It seems the AWS Toolkit wants to manage its own temporary credentials outside the scope of the AWS CLI. In the main DataGrip window, at the bottom-right corner, you should see a notice about which AWS credentials are in use. For me, there was also a warning icon.

Screenshot 2024-02-27 at 9 54 16 AM

By clicking through that menu, it initiated a separate IAM Identity Center sign-in session in my web browser, and then stored the credential. The warning icon then disappeared, and I was able to connect to my RDS instance.

@vhnguyenae
Copy link
Author

vhnguyenae commented Feb 28, 2024

thanks for the help, but it still doesn't work for me 😅 , I tried it but now I got an Operation TimeOut instead 😅
image

But the DataSource that I created for DynamoDb and Athena worked fine though 🤔 .
My RDS instance is in a VPC though, maybe that's the issue?

@vchikoti1998
Copy link
Contributor

This has been addressed in #4278

@vchikoti1998
Copy link
Contributor

This issue got released in AWS Toolkit version 3.2

@vhnguyenae
Copy link
Author

@vchikoti1998 I updated the AWS Toolkit to version 3.4 but I still got the same error message :(

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.
Projects
None yet
Development

No branches or pull requests

3 participants