Geth Local Network RPC Error – Solving Connection Issues

go-ethereumjavascriptnodes

I have been working on trying to run a geth node on my home server (FreeBSD jail on a freenas) and setting up my laptop geth to attach to the rpc to save space on my laptop. I have confirmed that the geth node on the server works and I can connect locally on the jail through geth attach http://localhost:8545. However, when I try to connect to the node through my windows laptop using geth.exe attach http://XXX:8545 I get the error:

Fatal: Failed to start the JavaScript console: api modules: invalid character 'i' looking for beginning of value.

Has anyone tried something similar or know why this may be happening?

Best Answer

In geth 1.8, if you're using a name instead of IP to attach to, you need to set the rpcvhosts option when starting geth:

geth --testnet console --light --rpc --rpcport 33000 --rpccorsdomain "*" --rpcaddr "127.0.0.1" --rpcapi "db,eth,net,web3,personal" --rpcvhosts=yourDomainHere.com

Related Topic