I’m trying to deploy my Nest/TypeOrm application and connect it with aiven.io. And I even did it once, app was connected and made some changes in db. But then, after I mooved credentials to .env file something happened.
I can’t connect to db with the next error:
[Nest] 7399 - 10.07.2024, 01:48:00 ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
Error: self-signed certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:871:12)
At the same time I can connect with vanil js file, which I got from aiven.io. I restored the first config version, but everythig useless. The same cs.pem file – js connects and Nest no. I tried use ca as file and as string. I restarted everything.
It looks like a TypeOrm problem