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

Can't connect to RDS database due to SSL #730

Open
sleao opened this issue Apr 28, 2024 · 7 comments
Open

Can't connect to RDS database due to SSL #730

sleao opened this issue Apr 28, 2024 · 7 comments

Comments

@sleao
Copy link

sleao commented Apr 28, 2024

Hi, I'm trying to use Planka with a RDS Postgres and I can't seem to figure out how to setup SSL. I tried everything from #696 and it still won't connect. Sometimes I get the error: error: no pg_hba.conf entry for host "xxx.xxx.xxx.xxx", user "kanban", database "planka", no encryption error message and other times, this:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error: self-signed certificate in certificate chain
    at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
    at TLSSocket.emit (node:events:517:28)
    at TLSSocket._finishInit (node:_tls_wrap:1070:8)
    at ssl.onhandshakedone (node:_tls_wrap:856:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
Node.js v18.20.2

Any ideas on what to do here? this is what my variables look like:

  • BASE_URL=http://localhost:3000
  • DATABASE_URL=postgresql://planka:password@host/planka?ssl=true
  • SECRET_KEY=secretkey
  • PGSSLMODE=require
@daniel-hiller
Copy link
Member

daniel-hiller commented Apr 29, 2024

Hi,
You are using a self signed certificate
You have to use this variable too
'''

  • KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false

'''

@sleao
Copy link
Author

sleao commented Apr 29, 2024

Hi, You are using a self signed certificate You have to use this variable too '''

  • KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false

'''

That didn't work, I'm still getting the "SELF_SIGNED_CERT_IN_CHAIN" error.

@daniel-hiller
Copy link
Member

can you test the connection the db host using the cli?

psql -d "dbname=postgres sslmode=require" -h psql.example.com -U postgres

you need to install the psql client first apt install postgresql-client

@sleao
Copy link
Author

sleao commented Apr 29, 2024

can you test the connection the db host using the cli?

psql -d "dbname=postgres sslmode=require" -h psql.example.com -U postgres

you need to install the psql client first apt install postgresql-client

Yes I can, I can also connect via Beekeeper and pgadmin, if that helps.

@daniel-hiller
Copy link
Member

okay
give me a bit time, i will install postgresql with ssl to test

@sleao
Copy link
Author

sleao commented Apr 29, 2024

If you need some help, let me know, we can work this out together.

@whims-services
Copy link

whims-services commented Jun 1, 2024

Hi @sleao,

I could connect on my RDS with dburl: as value in helm chart with this connexion string : "postgres://<user>:<password>@<rds_endpoint>:5432/planka?sslmode=disable&connect_timeout=10"

My settings form RDS is just adding a custom parameter group with rds.force_ssl=0 and restart the RDS for apply the changes.
Check this link for more informations.

After that, just got (process:20): VIPS-WARNING **: 13:11:31.773: threads clipped to 1024 but if my container restart the datas are still there.

I hope it will help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants