When move to prodction env I get a server error

Failure Logs

[forest] ��� Unexpected error: self signed certificate
{
“name”: “SequelizeConnectionError”,
“parent”: {
“code”: “DEPTH_ZERO_SELF_SIGNED_CERT”
},
“original”: {
“code”: “DEPTH_ZERO_SELF_SIGNED_CERT”
},
“stack”: “SequelizeConnectionError: self signed certificate\n at /app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:315:20)\n at TLSSocket.reportStreamError (/app/node_modules/pg/lib/connection.js:57:10)\n at TLSSocket.emit (events.js:315:20)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task_queues.js:80:21)”
}

Context

I use PostgreSQL and deploy using Heroku, I attached a database from a different heroku project to “AdminBackEnd” project

Hello @uripeled2 ! :wave: Welcome to our community :tada: :confetti_ball:

The logs say that the agent is refusing to connect to your database because of the error DEPTH_ZERO_SELF_SIGNED_CERT which indicates that your DB uses a self-signed certificate that cannot be validated. Probably caused by the Heroku config for this different postgres.

The following thread give a solution to accept invalid certificate.

Let me know if it help.

Thanks in advance
Morgan.

1 Like