Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Connection Attempt Timeout When Connecting To Postgres DB Using IAM Authentication #52045

Closed
Amraafat opened this issue Jan 21, 2025 · 3 comments

Comments

@Amraafat
Copy link

Topic

Postgres Connection Error

Relevant information

I have enabled IAM authentication on my database. When I tried to connect using a token, I initially received a 'connection attempt timeout' error. However, after several attempts (3-6), the connection eventually succeeded.

The problem was not in the login, because I can log in but it sometimes took too long after many trials before connecting, and this is a hassle for the developers if they need to connect fast, and for sure I don't want to use a username and password for them for better security

The following errors appear in the logs:

  • pam_authenticate failed: Permission denied
  • connection attempt timeout
  • FATAL: canceling authentication due to timeout
  • HTTP/1.1 503 Service Unavailable

Note:

  • I am using DBeaver to connect to the DB.
  • I am assuming a role in another account before generating the token.
  • I am using the same command to generate the token each time, and I have verified that the session is not expired.

What could be the issue that prevents the connection from succeeding on the first attempt?

What I checked:

  • I checked the policy and the db-user.
  • I checked the security group.
  • I checked IAM authentication is enabled
  • Increased the 'authentication_timeout' in the parameter group
  • Increased the 'connection timeout' in the Dbeaver setting
@marcosmarxm
Copy link
Member

Is this a problem with airbyte-db or postgres connector?

@Amraafat
Copy link
Author

postgres connection

@marcosmarxm
Copy link
Member

So I kindly ask you to report using the correct template for connector issues.

@airbytehq airbytehq locked and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants