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

[Bug] self-hosted temporal with AWS RDS (Unable to connect to SQL database) #465

Closed
MayurDuduka opened this issue Feb 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@MayurDuduka
Copy link

What are you trying to do?

Trying to deploy self-hosted Temporal on AWS EKS cluster with AWS Postgres RDS as persistence layer.
I'm following this custom values file for reference.
however, the setup-schema job is failing with the below-mentioned error.

2024-02-12T12:45:27.121Z	ERROR	Unable to connect to SQL database.	{"error": "pq: no pg_hba.conf entry for host \"x.x.x.x\", user \"postgres\", database \"temporal_visibility\", no encryption", "logging-call-at": "handler.go:73"}
I tried with auto-setup k8s job and admintools pod manually by running temporal-sql-tool commands. but error is same.
I'm able to connect with postgres using postgres-client in the kubernetes cluster as well as using pgadmin.
  • ip which is showing up in the error, that's not from RDS dns.
  • also tried updating the parameter group of rds for pg_hba.conf to rds.force_ssl=0

Describe the bug

Minimal Reproduction

  • get eks cluster version 1.28
  • get existing rds postgres 15.4
  • deploy temporal using helm from release 0.33.0 with this custom-values file as a reference.

Environment/Versions

  • Temporal release Version: 0.33.0
  • Temporal version: 1.22.4
  • EKS Kubernetes: 1.28

Additional context

@MayurDuduka MayurDuduka added the bug Something isn't working label Feb 13, 2024
@MayurDuduka MayurDuduka changed the title [Bug] self-hosted temporal with AWS RDS [Bug] self-hosted temporal with AWS RDS (Unable to connect to SQL database) Feb 13, 2024
@luismacosta
Copy link

luismacosta commented Feb 14, 2024

Hi @MayurDuduka

I had the same issue
The error shows "no encryption"
The default rds.force_ssl parameter is set to 1 since RDS PostgreSQL version 15
You need to run temporal-sql-tool with parameters --tls --tls-ca-file bundle.pem
Regarding bundle.pem file, certificate bundles for specific aws regions can be found here
Also, in values.yaml, enable tls sections:

tls:
  enabled: true

@robholland
Copy link
Contributor

The schema jobs were not correctly configured to setup TLS. This has been fixed in #411.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants