【问题标题】:Receiving Invalid database URL while trying to start chainlink node尝试启动chainlink节点时收到无效的数据库URL
【发布时间】:2023-03-11 13:40:02
【问题描述】:

我正在尝试在 rinkeby 测试网中启动一个 chainlink 节点。我已经在 AWS 中设置了一个 postgres 数据库。数据库 URL 已经给出。以下是我尝试启动节点时的错误。

[ERROR] invalid database url %spostgresql://postgres:Bounty2000%@database-1.ciiecd8szsuh.us-west-1.rd
s.amazonaws.com:5432/db_sar_rinkeby orm/config.go:283 

[ERROR] failed to initialize database, got error failed to connect to `host=/tmp user=root database=`
: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory) orm/orm.go:82 

[ERROR] failed to initialize database, got error failed to connect to `host=/tmp user=root database=`
: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory) orm/orm.go:82 

我尝试从 AWS 前端更改一些设置,但没有任何帮助。如果有人有任何线索,请帮助我。

【问题讨论】:

    标签: chainlink


    【解决方案1】:

    Based on the documentation 看起来你的 postgres URL 前面可能有一个“s”,尝试在你的 .env 文件中删除它。还可以尝试将数据库名称替换为 IP 地址+端口。应该替换 $DATABASE 的是“postgres”。最后尝试添加 ?sslmode=disable 如果您没有在数据库中激活 ssl(不推荐用于生产节点)。

    .env 中的示例:

    DATABASE_URL=postgresql://me1234:password1234@10.10.100.100:3000/postgres?sslmode=disable
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-25
      • 1970-01-01
      • 1970-01-01
      • 2021-08-27
      • 2020-10-04
      相关资源
      最近更新 更多