0

I am trying to start local 0x-api(https://github.com/0xProject/0x-api).
I first tried starting the api setting Infura Rpc Url in .env . Everything worked great.
But I want to use my Local Ethereum node with Geth instead of Infura. So I run Geth with --http.port 3334 because port 8545 is already in use by one of the docker images (as I understand) after sudo docker-compose up.
enter image description here

After running Geth I can execute requests.enter image description here

I changed my ETHEREUM_RPC_URL in .env to http://127.0.0.1:3334. After that I do yarn, yarn build, sudo docker-compose up, yarn db:migrate and then start API with yarn start:service:swap_http. enter image description here

But after some seconds I got an error: enter image description here

How to fix it?

1 Answer 1

0

You would need to make your Geth node accessible to the docker containers. From the perspective of the docker container, the geth node isn't running on 127.0.0.1. It may be accessible on your local network IP.

1
  • How can I make my Geth node accessible to the docker container? I run Geth with exact command geth --syncmode "light" --http --http.port 3334 --http.addr "0.0.0.0" --http.corsdomain '*'. Then I set ETHEREUM_RPC_URL in .env to http://<my IPv4>:3334, start swap service and get the error "Error","msg":"network timeout at: http://<my IPv4>:3334/". What am I doing wrong? How to do it safely, for personal use only? I don't understand how net connections work in this situation.
    – xKarma
    Oct 21, 2021 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.