无法启动 Chainlink:正在打开数据库:无法打开数据库:
当我“chainlink节点启动”时, 我收到错误:
“无法启动 Chainlink:打开数据库:无法打开数据库:无法连接到 host=/private/tmp user=myname database=
:服务器错误(致命:无法识别的配置参数” ?application_name" (SQLSTATE 42704))"
我关注此 YouTube 视频:https://youtu.be/ZB3GLtQvgME?t=2017 我有一个 .env 但它不是从那里读取的。 无论我对 DATABASE_URL 进行什么更改, 我得到同样的错误。
ETH_URL=wss://kovan.infura.io/ws/v3/
FEATURE_EXTERNAL_INITIATORS=true
LOG_LEVEL=debug
ETH_CHAIN_ID=42
MIN_OUTGOING_CONFIRMATIONS=2
LINK_CONTRACT_ADDRESS=
CHAINLINK_TLS_PORT=0
SECURE_COOKIES=false
ALLOW_ORIGINS=*
DATABASE_URL=postgresql://localhost:5432/kovan_demo?sslmode=disable
DATABASE_TIMEOUT=0
FEATURE_FLUX_MONITOR=true
MINIMUM_CONTRACT_PAYMENT=0
CHAINLINK_DEV=true
When I "chainlink node start",
I get the error:
"Cannot boot Chainlink: opening db: failed to open db: failed to connect to host=/private/tmp user=myname database=
: server error (FATAL: unrecognized configuration parameter "?application_name" (SQLSTATE 42704))"
I follow this youtube video: https://youtu.be/ZB3GLtQvgME?t=2017
I have a .env
but it is not reading from there.
No matter what I change on DATABASE_URL,
I get the same error.
ETH_URL=wss://kovan.infura.io/ws/v3/
FEATURE_EXTERNAL_INITIATORS=true
LOG_LEVEL=debug
ETH_CHAIN_ID=42
MIN_OUTGOING_CONFIRMATIONS=2
LINK_CONTRACT_ADDRESS=
CHAINLINK_TLS_PORT=0
SECURE_COOKIES=false
ALLOW_ORIGINS=*
DATABASE_URL=postgresql://localhost:5432/kovan_demo?sslmode=disable
DATABASE_TIMEOUT=0
FEATURE_FLUX_MONITOR=true
MINIMUM_CONTRACT_PAYMENT=0
CHAINLINK_DEV=true
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
数据库参数通过
The database parameters are set via environment variable
正如理查德所说,您需要将 DATABASE_URL 设置为环境变量。由于某种原因,chainlink 客户端无法读取文件
.env
并按预期设置环境变量。我解决这个问题的方法是通过命令显式地将
DATABASE_URL
设置为环境变量:您可以找到Chainlink节点的所有配置此处。
希望有帮助。
As Richard said, you need to set
DATABASE_URL
as an environment variable. For some reason, the chainlink client cannot read file.env
and set the environment variable as expected.The way how I solve the problem is to set
DATABASE_URL
as an environment variable explicitly by command:You can find all configurations of Chainlink node here.
Hope it helps.
连接到数据库的格式如下:
我总是按照以下步骤创建数据库:
只需更改变量
然后:
我完全不建议将这些凭据用于生产。
The format to connect to the database is the following:
I always follow this steps to create the database:
Just change the variables
And then:
I don't recommend at all this credentials for production.