psql:FATAL:从fabric explorer的sql文件创建数据库时,角色“root”不存在

问题描述 投票:0回答:2

我从psql: FATAL: role "root" does not exist运行./createdb.sh时遇到错误https://github.com/hyperledger/blockchain-explorer。我正在尝试在Centos上运行区块链资源管理器。

postgresql centos hyperledger-explorer
2个回答
0
投票

我认为最后一个版本破坏了某些东西,或者使它与某些工具不兼容。

尝试恢复到原始的docker镜像:hyperledger / explorer-db:0.3.8 hyperledger / explorer:0.3.8

这对我来说很有把戏。


0
投票

运行createdb.sh脚本时,类似的错误“psql:FATAL:role”postgres“不存在”。我想在ubuntu上安装。

我通过运行以下命令修复它:

/home/linuxbrew/.linuxbrew/Cellar/postgresql/11.4/bin$ createuser -s postgres

而不使用sudo运行createdb.sh脚本。

希望这可以帮助别人。


-1
投票

您应该在运行脚本时指定DB用户。

修改explorerconfig.json下的blockchain-explorer/app以包含与DB的连接属性,如“host”,“port”,“database”,“username”和“password”。

请参阅他们的github repo中的自述文件 - https://github.com/hyperledger/blockchain-explorer/blob/master/README.md#Database-Setup

© www.soinside.com 2019 - 2024. All rights reserved.