mediadc icon indicating copy to clipboard operation
mediadc copied to clipboard

Can't connect to postgresql socket

Open pricly-yellow opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug Try to install MediaDC first time, all python libraries installed correctly with autoinstall, nextcloud db config for postgres like this: "dbtype" => "pgsql", "dbname" => "nextcloud", "dbuser" => "username", "dbhost" => "/var/run/postgresql", "dbport" => "", "dbtableprefix" => "oc_", "dbpassword" => "password",

Desktop (please complete the following information):

  • OS Debian 11
  • CPU x86_64
  • Browser Firefox
  • Nextcloud version 23
  • Database configuration Postgresql with local md5 connection
  • Python version 3.9.2
  • MediaDC version 0.1.8

Additional context db_exception_handler:

Traceback (most recent call last):

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/core.py", line 225, in init

self._usock.connect(unix_sock)

FileNotFoundError: [Errno 2] No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/connectors.py", line 54, in create_connection

connection = dbapi.connect(unix_sock=config['usock'],

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/dbapi.py", line 201, in connect

return Connection(

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/core.py", line 229, in init

raise InterfaceError("communication error") from e

db.pg8000.exceptions.InterfaceError: communication error

Cant connect to database.

pricly-yellow avatar Jan 12 '22 05:01 pricly-yellow

@pricly-yellow Good issue, nice formatting, easy to read. That's my mistake :( We will not release a new version soon(not in a few days), we need more bugs/fixes for that. As quick fix you can change path from "dbhost" => "/var/run/postgresql", to "dbhost" => "/var/run/postgresql/",

or you can change a code in file MediaDC/lib/Service/python/db/manager.py like in linked commit.

bigcat88 avatar Jan 12 '22 10:01 bigcat88