简体   繁体   中英

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.

Doc used: 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

Error Message: Incorrect Usage. flag provided but not defined: -network Incorrect Usage. flag provided but not defined: -network

Note: Tried with --network=host - same result

  1. Changing the db_url from 127.0.0.1 to localhost

Error Message: 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 )

Error Message: 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.

FYI: in mac os to find your IP is ifconfig . You'll need to find the en0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM