JSON-RPC serve examples don't work

I am always getting one of these 2 errors below no matter which RPC function i try. Started off with provided docker image, then experimented with different geth parameters - same result.
What am i doing wrong?

[email protected]:/# geth --datadir /tmp/eth/42 --port 30303 --password <(echo -n notsosecret) --unlock 0 --rpcport 8545 &

[[email protected] download]$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' http://127.0.0.1:8545
curl: (56) Recv failure: Connection reset by peer

[[email protected] bank.js]$ curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' http://127.0.0.1:8545
curl: (52) Empty reply from server

Answers

Sign In or Register to comment.