I meet error psql: FATAL: role "root" does not exist
when running ./createdb.sh
from https://github.com/hyperledger/blockchain-explorer
. I am trying to run the blockchain explorer on Centos.

- 21
- 2
-
your question should more details. – Zakir Hossain Mar 04 '19 at 06:24
-
This question lacks detail, but it looks like a MySQL script run against PostgreSQL, which doesn't work so well. – Laurenz Albe Mar 04 '19 at 08:00
3 Answers
I think the last version broke something, or makes it incompatible with some of the tooling around.
Try reverting to the prev docker images: hyperledger/explorer-db:0.3.8 hyperledger/explorer:0.3.8
That did the trick for me.

- 2,170
- 16
- 22
Similar error for me "psql: FATAL: role "postgres" does not exist" when running the createdb.sh script. I am trying to install on ubuntu.
I fixed it by running the following command before :
/home/linuxbrew/.linuxbrew/Cellar/postgresql/11.4/bin$ createuser -s postgres
than run the createdb.sh script WITHOUT using sudo.
Hope this can help somebody.

- 71
- 8
You should specify the DB user while running the script.
Modify explorerconfig.json
under blockchain-explorer/app
to include the properties of the connection to DB like "host", "port", "database", "username" and "password".
Please refer to this readme from their github repo - https://github.com/hyperledger/blockchain-explorer/blob/master/README.md#Database-Setup

- 818
- 3
- 14
- 34