bug: Connection to SSL DB: Error: self signed certificate in certificate chain
See original GitHub issueDescribe the bug
I use a DigitalOcean Managed Postgres database for the deployment, but get the following error when starting the logto container:
Error while initializing app Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1535:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:949:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:730:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
Expected behavior
Logto should be able to connect to SSL only databases.
How to reproduce?
- Get a hosted DB at DigitalOcean
- Configure the Logto Docker Container like this
Alright tried
I tried to use the following env vars to circumvent the problem:
- NODE_TLS_REJECT_UNAUTHORIZED='0'
- PGSSLMODE=no-verify
Context
OS: Linux Docker: ghcr.io/logto-io/logto:1.0.0-beta.6
Issue Analytics
- State:
- Created a year ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
bug: Connection to SSL DB: Error: self signed certificate in ...
The hotfix would be to have an environment variable that allows to trust the SSL cert of the database. That env var has...
Read more >Resolving SSL Self-Signed Certificate Errors
This is caused by git not trusting the certificate provided by your server. Workaround. One possible workaround is to temporary disable SSL ......
Read more >self signed certificate error · Issue #2009 · brianc/node-postgres
We updated our packages today and afterwards started seeing a connection error from Sequelize ORM: "self signed certificate".
Read more >SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using ...
The error SELF_SIGNED_CERT_IN_CHAIN means that you have self signed certificate in certificate chain which is basically not trusted by the system.
Read more >Troubleshooting issues with self-signed certificate
General Guidelines in avoiding connection failure errors: When a client tries to connect to the Oracle NoSQL Database Proxy it fetches the SSL...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, @akoenig. I saw the discussion between you and Gao on Discord yesterday. This looks promising and we will document it on our docs site if that also works for @flobaader
@charIeszhao Alright thank you, looking forward to your results!