mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
External Postgresql with SSL does not connect properly #351
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tka85 on GitHub (Aug 18, 2023).
In a docker-compose I have these env vars setup (db string values are confirmed to be correct with psql connecting properly using them on CLI):
My SSL cert is from letsencrypt. Not self-signed. It is mounted correctly into pg container and I have another webapp that is connecting to this postgresql over SSL correctly.
On postgresql (v14) side I see logs:
And on Planka side:
It seems that the
?ssl=true&sslmode=requireis not honored at first as Pg rejects the non-secure connection attempt. But then there is an SSL connection attempt but fails on the Planka side.Am I missing something?
@tka85 commented on GitHub (Aug 28, 2023):
I switched the
pg_hba.confentry fromscram-sha-256tomd5just in case planka was using some older version that couldn't do the exchanged required by the newerscramauth method, but still the same problem. Initially planka tries to connect via unencrypted connection which is immediately rejected bypg_hba.confand then it tries SSL but it disconnects immediately.This is te pg_hba entry:
The password is correct. I tried connecting from same source host to same destination host and db via psql and it connects fine.
I could really use some pointers here. Anyone else got the planka working over SSL connection to Postgres?
@meltyshev commented on GitHub (Aug 30, 2023):
I checked the
.env.samplefile and it hasPGSSLMODEandKNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATEvariables (they should also be indocker-compose.yml). Have you tried to set values to them?You can also try to uncomment
ssl: trueinserver/config/env/production.js. I haven't tested it, I thought everything should work with?ssl=true&sslmode=require...@tka85 commented on GitHub (Sep 6, 2023):
Sorry, can no longer check this and don't want to hold the issue open if no one else is interested. Moved on to another solution.