首页 > 解决方案 > 输入密码后,恒星 docker image db init 失败

问题描述

第一次尝试在持久性模式下运行 stellar docker 映像并在输入并确认新密码后收到此错误:

  pq: password authentication failed for user "stellar"

码头工人命令

  docker run --rm -it -p "8000:8000" -v "/dev/stellar:/opt/stellar" --name stellar stellar/quickstart --testnet

我试图编辑 pg_hba.conf 但我没有看到已配置的 stellar 用户。

此外,我验证了 stellar-core.cfg 具有设置期间定义的正确数据库密码。

标签: blockchaincryptocurrencystellar

解决方案


我在使用带有特殊字符的密码时遇到了完全相同的问题(太花哨而sed无法处理?)。然后我重新创建了'/opt/stellar'共享卷并用作stellarpasswd新的 Postgresql 密码。它奏效了!:)

另一条信息,也许更重要。我还stellar向我的主机添加了用户。当默认配置被rsync编辑为 时'/opt/stellar',如果没有该用户在我的主机上,这可能无法正常工作。


推荐阅读