Cardano-db-sync problems

I am setting up Cardano-db-sync and am in the process of syncing the node. When I checked to see if it was synced, I saw that I am getting an error and no longer able to start the sync process again. When I run:

PGPASSFILE=config/pgpass-mainnet db-sync-node/bin/cardano-db-sync \
    --config config/mainnet-config.yaml \
    --socket-path ../cardano-node/state-node-mainnet/node.socket \
    --state-dir ledger-state/mainnet \
    --schema-dir schema/

I get this error:

[db-sync-node:Info:6] [2021-10-16 08:45:15.52 UTC] Schema migration files validated
[db-sync-node:Info:6] [2021-10-16 08:45:15.52 UTC] Running database migrations
ExitFailure 2

Errors in file: /tmp/migrate-2021-10-16T084515.log

When I check the log, this is what is says:

  GNU nano 4.8                                   /tmp/migrate-2021-10-16T084515.log
Running : migration-1-0000-20190730.sql
WARNING: password file "config/pgpass-mainnet" has group or world access; permissions should be u=rw (0600) or less
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
ExitFailure 2

Has anyone encountered this before?


Hi, i think you have to wait, we all have to wait…it seems there are general problems on the blockchain. Also my nodes are in sync mode after months of good work

I feel like there is something I am doing wrong or not doing…

What exactly is this dB sync routine doing?

was syncing fine and syncing, woke up…had some error and stopped syncing…tried re running…get that error

We are all having sync problems atm

You need to chmod go-rwx config/pgass-mainnet .

It also seems you do not even have PostgreSQL installed.

1 Like

What problems? Pretty sure the Cardano chain is completely fine at the moment. The cardano explorer shows new blocks arriving about 3 times per minute.

As erik already mentioned the error you receive is great source of information.

chmod 0600 config/pgpass-mainnet ought to do it for the warning.

sudo apt install postgresql ought to help with SQL database connections :wink:

Right, I had actually tried both of those. I just ended up rebuilding cardano-db-sync and postgresql…now its working.

Yeah, im not 100% sure what happened. I had started syncing it the night before, and woke up to some error, when I tried resyncing…those were the errors I got.

I just ended up re downloading postgres and rebuilding db-sync, all is well now.