Trying to get db sync to do the initial database setup. I have this running on another ubuntu 20 box, and I trying to recreate it from scratch with all of the same versions and this time I am getting an error trying to run it
Running : migration-1-0000-20190730.sql
psql: error: fe_sendauth: no password supplied
ExitFailure 2
i know that it seems the pgpass file because when I run
PGPASSFILE=config/pgpass-mainnet scripts/postgresql-setup.sh --createdb
It recognizes the username I put in there. And the password is in there as well Here is the db sync command I am running:
PGPASSFILE=/home/user/cardano-db-sync/config/pgpass-mainnet \
/home/user/cardano-db-sync/db-sync-node/bin/cardano-db-sync \
--config /home/user/cardano-db-sync/config/mainnet-config.yaml \
--socket-path /var/ada/node.socket \
--state-dir /home/user/cardano-db-sync/ledger-state/mainnet \
--schema-dir /home/user/cardano-db-sync/schema/ \
which results in the following response
[db-sync-node:Info:6] [2022-03-25 03:22:50.40 UTC] Schema migration files validated
[db-sync-node:Info:6] [2022-03-25 03:22:50.40 UTC] Running database migrations
[db-sync-node:Info:6] [2022-03-25 03:22:50.40 UTC] Enviroment variable DbSyncAbortOnPanic: False
ExitFailure 2
Errors in file: /tmp/migrate-2022-03-25T032250.log
and the log file is what contains the authentication error.. my pgpass looks like
/var/run/postgresql:5432:cexplorer:username:'userpass'
I have also tried using localhost and 127.0.0.1. I notice when running
PGPASSFILE=config/pgpass-mainnet psql cexplorer
it asks me to authenticate for my current user, NOT the user in the mgpass file but when running the previous command for creating db it asks me the password for the correct user in the pgpass file. Both users can log into postgres regardless and actually have the same password at the moment. Any clues would be appreciated this is with cradno-db-sync 12.0.2 the latest node release.