4

I'm running ethereum/client-go docker image with the following flags:

docker run -p 8545:8545 ethereum/client-go --rpcapi personal,db,eth,net,web3 --rpc --rpcaddr 0.0.0.0 --rpccorsdomain * --rinkeby

This image is running on machine A and I can query the RPC within it. But when I try to query it from machine B I receive the following response:

Request:

curl -X POST http://<machine_A_address>:8545 -H "Content-Type: application/json" --data '{"jsonrpc":"2÷.0","method":"eth_coinbase","params":[],"id":64}' --verbose

Response:

< HTTP/1.1 403 Forbidden
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Wed, 18 Apr 2018 14:58:44 GMT
< Content-Length: 23
< 
invalid host specified
* Connection #0 to host ... left intact

How can I query the ethereum client hosted on machine A from machine B ? Where I can find the ethereum client logs so I can debug it ?

8

Adding --rpcvhosts=* this flag to the starting command solved the issue

1
  • on my machine, I need single quotes: --rpcvhosts='*' – Edward R. Mazurek Dec 10 '18 at 20:17

Your Answer

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

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