backend-replacement icon indicating copy to clipboard operation
backend-replacement copied to clipboard

problem when deploying the backend

Open vitorgamer58 opened this issue 5 years ago • 2 comments

if i do: docker-compose run contract_observer alembic upgrade head with alembic.ini line 38: sqlalchemy.url = postgresql+psycopg2://dex1:password@postgres:5432/forkdelta

i get this error: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: password authentication failed for user "postgres"

and if with alembic.ini line 38: sqlalchemy.url = postgresql+psycopg2://dex1:password@localhost:5432/forkdelta

i get this error:

psycopg2.OperationalError: could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?
could not connect to server: Address not available
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5432?

bu i can connect with postgresql with python from my home computer:

>>> psycopg2.connect("dbname=forkdelta user=dex1 host=dex.xxxx.top password=xxx port=5432")
<connection object at 0x03BAFDF0; dsn: 'user=dex1 password=xxx dbname=forkdelta host=dex.notasdovitor.top port=5432', closed: 0>

refer to: https://github.com/Vitors-DEX-Exchange/DEX-Backend/issues/1

vitorgamer58 avatar Sep 29 '19 13:09 vitorgamer58

It seems to be a problem with your postgres configuration Have you set a password after initial installation? Please see this topic

ghost avatar Sep 29 '19 15:09 ghost

It seems to be a problem with your postgres configuration Have you set a password after initial installation? Please see this topic

i set password for users root, postgres and dex1.

here is my posgresql log postgresql-10-main.log

vitorgamer58 avatar Sep 29 '19 16:09 vitorgamer58