Issue connecting to database

I am setting up bors-ng to run in Docker using the prebuilt Docker image on dockerhub. I’m deploying the Docker container on AWS Fargate/ECS using a hosted PostgreSQL RDS instance.

When my application is starting up I’m getting

[error] Postgrex.Protocol (#PID<0.123.0>) failed to connect: ** (DBConnection.ConnectionError) ssl connect: Unexpected error: ssl_not_started - :ssl_not_started

I’m not familiar with Ecto/Elixir. Does anyone know what could be wrong? The TCP check when the Docker image is starting up seem to connect well.

I’ve tried adding ?ssl=false and ?ssl=true in DATABASE_URL but that didn’t help.

1 Like

Hello Jens!

Unfortunately Bors-NG DB adapter (Echo) does not support reading the SSL definition from the URL in the current version. You have to use a second environment variable to configure it. Try setting DATABASE_USE_SSL=true (or false) in your ECS deployment config and see if it works.

1 Like

Setting DATABASE_USE_SSL=false solved the issue. Thanks!

1 Like