简体   繁体   English

运行 Chainlink 节点 - 在 MacOS/OSX 中将本地 Docker/DB 连接到 Docker/Node 问题

[英]Running a Chainlink Node - Connecting local Docker/DB to Docker/Node issue in MacOS/OSX

Running the Chainlink Node with local docker/postgres in OSX Catalina is quite cumbersome due to failed ORM connection or any others.由于 ORM 连接或任何其他连接失败,在 OSX Catalina 中使用本地 docker/postgres 运行 Chainlink 节点非常麻烦。

Doc used: https://docs.chain.link/docs/running-a-chainlink-node使用的文档: https://docs.chain.link/docs/running-a-chainlink-node

To check if my local db is indeed working ok.检查我的本地数据库是否确实工作正常。 I've ran these commands with successful results:我已经成功运行了这些命令:

psql postgresql://suchain:docker@127.0.0.1:5432/chainlink


psql -h localhost -U suchain -d chainlink

What have been tried so far到目前为止已经尝试过什么

  1. Adding --network host haven't resolve the connection issue添加--network host没有解决连接问题

Error Message: Incorrect Usage. flag provided but not defined: -network错误消息: Incorrect Usage. flag provided but not defined: -network Incorrect Usage. flag provided but not defined: -network

Note: Tried with --network=host - same result注意:尝试使用--network=host - 结果相同

  1. Changing the db_url from 127.0.0.1 to localhost将 db_url 从 127.0.0.1 更改为 localhost

Error Message: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)错误消息: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)

  1. Changing the localhost/127.0.0.1 to docker instance name (like pg-docker )将 localhost/127.0.0.1 更改为 docker 实例名称(如pg-docker docker )

Error Message: hostname resolving error (lookup pg-docker on 192.168.65.1:53: no such host)错误消息: hostname resolving error (lookup pg-docker on 192.168.65.1:53: no such host)

Which other options can be used?还可以使用哪些其他选项?

Much thanks in advance非常感谢提前

What pages have been checked before filing this one:在提交此之前检查了哪些页面:

Thanks to Patrick.感谢帕特里克。 The root cause is the same as in this link根本原因与此链接中的相同

Replacing the db link from localhost/127.0.0.1 to the private/local IP(192.168.0.x) fixed the issue.将 db 链接从 localhost/127.0.0.1 替换为私有/本地 IP(192.168.0.x) 解决了该问题。

FYI: in mac os to find your IP is ifconfig .仅供参考:在 mac os 中找到你的 IP 是ifconfig You'll need to find the en0你需要找到en0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行docker容器时连接到本地数据库 - Connecting to local DB while running docker container 使用 docker 运行 node ts 项目的问题 - Issue with running node ts project with docker 在docker conatiners中连接到以哨兵模式运行的Redis主节点时出现问题 - Issue while connecting to redis master node running in sentinel mode in docker conatiners 无法在 Dokku 上构建节点应用程序,在 Macos 上作为 Docker 映像运行 - Failed to build node app on Dokku running as a Docker image on Macos docker chainlink 容器未连接到 postgres 数据库 - docker chainlink container not connecting to postgres database 使用 Docker 运行 Node 应用程序时出错:db-on-docker@1.0.0 start: `node index.js` - Error while running Node application with Docker: db-on-docker@1.0.0 start: `node index.js` Docker 修改的节点容器未连接或在 docker swarm 覆盖网络中看到 mongo db 容器 - Docker modified node container not connecting or seeing mongo db container within docker swarm overlay network 使用主管在Docker中运行Node和Nginx - Running node and nginx in docker with supervisor 如何停止在docker中运行节点 - How to stop running node in docker 节点 js docker 未在 heroku 上运行 - node js docker is not running on heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM