cloud-py-api / mediadc

Nextcloud Media Duplicate Collector application
https://apps.nextcloud.com/apps/mediadc
GNU Affero General Public License v3.0
94 stars 7 forks source link

Nextcloud Postgres SSL issue #237

Open davidfrickert opened 4 months ago

davidfrickert commented 4 months ago

Small issue that i encountered but relatively easy fix.

If you use postgres as a database and it enforces SSL, you need to ensure your config.php has the appropriate ssl connection param, or MediaDC will fail. e.g.:

  'dbhost' => 'tools-pg:5432;sslmode=require',

The above works.

  'dbhost' => 'tools-pg

The above does not:

pg8000.exceptions.DatabaseError: {'S': 'FATAL', 'V': 'FATAL', 'C': '28000', 'M': 'pg_hba.conf rejects connection for host "10.42.3.91", user "nextcloud", database "nextcloud", no encryption', 'F': 'auth.c', 'L': '467', 'R': 'ClientAuthentication'}

It seems that Nextcloud by default attempts SSL connection, but MediaDC does not I guess.

This issue can be used to investigate the behaviour difference, or purely for info if anyone else encounters the same issue.