CHAINLINK NODE:如何解决“无法锁定ORM"问题?错误? [英] CHAINLINK NODE: How might I approach fixing "unable to lock ORM" errors?

查看:55
本文介绍了CHAINLINK NODE:如何解决“无法锁定ORM"问题?错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对设置链接节点的过程不太熟悉.我今天已经这样做了,但是遇到了一个问题.在最后一步,当尝试启动chainlink节点时,将以下内容放入命令行:

  cd〜/.chainlink-kovan&&docker run -p 6688:6688 -v〜/.chainlink-kovan:/chainlink -it --env-file = .env smartcontract/chainlink本地n 

运行此命令时,所有拉动均说"pull complete"(拉动完成)

我收到以下ORM错误:

2020-10-15T22:07:30Z [错误]无法锁定ORM:拨打tcp127.0.0.1:5432:连接t:记录器/默认连接被拒绝.go:139
stacktrace = github.com/smartcontrac
tkit/chainlink/core/logger.Error

/usr/local/go/src/runtime/proc.go:203 2020-10-15T22:07:30Z [FATAL]无法初始化ORM:拨打tcp 127.0.0.1:5432:
connect:连接被拒绝,无法为gorm DB打开

我不确定这可能是什么问题.有人可以指出我可能会开始调试此问题的方向吗?

解决方案

[错误]无法锁定ORM 是无法访问数据时给出的默认消息,它也不会没有看到另一个带锁的用户.您可以看到它无法连接到ORM的原因是: dial tcp 127.0.0.1:5432:connec t:连接被拒绝要解决此问题,您可以尝试以下几种不同的方法:

1.尝试使用 DATABASE_URL

的参数访问postgress数据库

如果您无法使用 DATABASE_URL 的参数进入数据库,则可能存在问题.您可以查看是否可以通过下载psql客户端进行连接.如果在ubuntu上,您可以使用:

  sudo apt-get更新须藤apt-get install postgresql-client 

,然后运行类似 psql -h IP_HERE -U USER_HERE 的东西,然后输入密码

2.为本地数据库添加-网络主机

如果在本地运行节点/数据库,则必须在链链接docker命令中添加-网络主机.

3.尝试 localhost 172.17.0.1 ,或者如果使用的是Mac,则使用云数据库.

在IP方面,Docker有点棘手.如果您正在运行本地数据库,并且尝试使用 127.0.0.1 ,则可能需要尝试 localhost .在Mac上,由于docker网关不能很好地与macOS配合使用,因此您会遇到问题,而轻松的解决方法是从heroku,GCP或AWS等云数据库中获取数据库URL.

如果这些都不适合您,请添加评论,我们可以更新此答案.

I am not overly familiar with the process of setting up a chainlink node. I have done so today, but am running into an issue. On the very last step, when attempting to start the chainlink node I put the following into the command line:

cd ~/.chainlink-kovan && docker run -p 6688:6688 -v ~/.chainlink-kovan:/chainlink -it --env-file=.env smartcontract/chainlink local n

When this runs the pulls all say "pull complete"

I am getting the following ORM errors:

2020-10-15T22:07:30Z [ERROR] unable to lock ORM: dial tcp 127.0.0.1:5432: connec t: connection refused logger/default.go:139
stacktrace=github.com/smartcontrac
tkit/chainlink/core/logger.Error

/usr/local/go/src/runtime/proc.go:203 2020-10-15T22:07:30Z [FATAL] Unable to initialize ORM: dial tcp 127.0.0.1:5432:
connect: connection refused unable to open for gorm DB

I am not sure what might be the issue. Could someone point me in the direction I might start in the debug this issue?

解决方案

[ERROR] unable to lock ORM is the default message given when the data is not able to be reached, and it also don't see another user with a lock. You can see the reason it can't connect to the ORM is because: dial tcp 127.0.0.1:5432: connec t: connection refused To fix, you can try a number of different things:

1. Try to access the postgress database using the parameters of the DATABASE_URL

If you can't get into the DB with the parameters of the DATABASE_URL there might be something wrong with that. You can see if you can connect by downloading the psql client. If on ubuntu you can use:

sudo apt-get update
sudo apt-get install postgresql-client

and then running something like psql -h IP_HERE -U USER_HERE and then entering your password

2. Add --network host for local databases

If you are running your node/database locally you'll have to add --network host to your chainlink docker command.

3. Try localhost, 172.17.0.1, or use a cloud DB if you're using a mac.

Docker is a little tricky when it comes to IPs. If you are running a local DB and you are trying to use 127.0.0.1, you may want to try localhost. On a mac, you'll run into issues since the docker gateway doesn't play nicely with macos, and easy work around is to get a database URL from a cloud database like on heroku, GCP, or AWS.

If none of these work for you, please add a comment and we can update this answer.

这篇关于CHAINLINK NODE:如何解决“无法锁定ORM"问题?错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆