2

I've set up geth to run in a Docker container with the following command (yes, I realize it's wide open to the world):

docker run -it -p 127.0.0.1:8545:8545 -p 30303:30303 -v /data/ethereum:/root/.ethereum ethereum/client-go:alpine --syncmode "fast" --cache=512 --rpc --rpcaddr "0.0.0.0"

Then, from a different machine, I run: curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' -H "Content-Type: application/json" http://IPADDRESS:8545

Nothing happens. geth appears to be running fine, but the http request times out.

Any idea what I'm doing wrong?

UPDATE: After several restarts, permissions configs, and other foolings-around, I am now receiving "Connection Refused" from curl. No idea what's going on here...

UPDATE 2: It absolutely has to do with Docker. Running geth on the machine itself (and not with Docker) results in everything working fine. So... ?

  • Did you solved this? – Rexcirus Apr 29 at 1:14
  • @Rexcirus, man, this was over a year ago, and I don't super-remember, but I'm pretty sure it had to do with firewall rules for the appropriate ports. I recall it eventually started working just fine. – EvilJordan Apr 29 at 5:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.