I suspect it is the command you are using.
This works:
user@Kumquat:~$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545
{"jsonrpc":"2.0","id":1,"result":{"currentBlock":"0x1eb260","highestBlock":"0x1eb478","knownStates":"0x0","pulledStates":"0x0","startingBlock":"0x1eaea3"}}
And this does not work:
user@Kumquat:~$ curl '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545
curl: (3) [globbing] nested brace in column 50
{"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}}
Here are some simple commands you can test with:
user@Kumquat:~$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":1}' http://localhost:8545
{"jsonrpc":"2.0","id":1,"result":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
user@Kumquat:~$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' http://localhost:8545
{"jsonrpc":"2.0","id":1,"result":"0x4a817c800"}
You need to enable personal API on the command line:
geth --rpcapi eth,web3,personal,admin
More info
However be aware that if you expose RPC socket to public Internet and personal API is exposed anybody can steal your Ether.
Best Answer
I got the same error. My problem is that in Chrome browser
HTTPS Everywhere
was turned on, which turnsinto
Turning off
HTTPS Everywhere
fixed the issue.