尝试启动链链接节点时收到无效的数据库 URL

问题描述

我正在尝试在 rinkeby testnet 中启动一个 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 前端更改一些设置,但没有任何帮助。如果有人有任何线索,请帮助我。

解决方法

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

.env 中的示例:

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