Skip to content

fix: disable SSL in postgresql.conf for CNPG snapshot compatibility - #6

Merged
Negashev merged 1 commit into
mainfrom
fix/disable-ssl-postgresql
Jul 30, 2026
Merged

Negashev merged 1 commit into
mainfrom
fix/disable-ssl-postgresql

Conversation

@Negashev

Copy link
Copy Markdown
Owner

Problem

CNPG snapshots have ssl = on in postgresql.conf. asyncpg tries SSL handshake through WebSocket tunnel → binary SSL data doesn't pass through tcp-over-websocket → Connection reset by peer.

The existing fix only overwrites pg_hba.conf (host all all all trust) but does NOT disable SSL in postgresql.conf. PostgreSQL still requires SSL, asyncpg tries SSL, fails through tunnel.

Solution

Add sed -i 's/^ssl.*=.*on/ssl = off/' /var/lib/postgresql/data/postgresql.conf alongside existing pg_hba.conf overwrite. Both run before docker-entrypoint.sh postgres starts.

Related

CNPG snapshots have ssl=on in postgresql.conf. asyncpg tries SSL
handshake through WebSocket tunnel → binary SSL data doesn't pass
through tcp-over-websocket → Connection reset by peer.

Add sed to disable ssl in postgresql.conf alongside existing pg_hba.conf
overwrite. Both run before docker-entrypoint.sh postgres starts.
@Negashev
Negashev merged commit 13de902 into main Jul 30, 2026
1 check passed
@Negashev
Negashev deleted the fix/disable-ssl-postgresql branch July 30, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant