Page MenuHomeDevCentral

Deploy corspat on docker
Open, NormalPublic

Event Timeline

Restored PostgreSQL dump from 2023-02-15 16:01.

db-A-001
$ sudo -u postgres psql corspat < restore.sql
[…]

$ sudo -u postgres psql corspat
psql (15.5)
Type "help" for help.

corspat=# \dt
           List of relations
 Schema |    Name     | Type  |  Owner
--------+-------------+-------+---------
 public | alerts      | table | corspat
 public | path        | table | corspat
 public | timetracker | table | corspat
 public | users       | table | corspat
(4 rows)

corspat=# SELECT count(*) from alerts;
 count
-------
     2
(1 row)

corspat=# SELECT count(*) from path;
 count
-------
    58
(1 row)

corspat=# SELECT count(*) from timetracker;
 count
-------
   500
(1 row)

corspat=# SELECT count(*) from users;
 count
-------
    14
(1 row)
dereckson triaged this task as Normal priority.Aug 4 2024, 17:37

This message is probably from January 2024. It was saved but not published.

PostgreSQL needs to be revisited:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: no pg_hba.conf entry for host "172.27.27.5", user "corspat", database "corspat", no encryption

pg_hba.conf entry is:
host corspat corspat 172.27.27.5/32 scram-sha-256

Solution 1. Replace scram-sha-256 by password

Solution 2. Ask psycopg2 to use scram-sha-256 to login. Corspat uses 2.9.1 and psycopg2 supports scram-sha-256 since 2017 / 2.7.3.2.