Go-ethereum: RPC connect remote server get Connection Refused err

Created on 19 Oct 2016  路  3Comments  路  Source: ethereum/go-ethereum

System information

Geth version: 1.5.0
OS & Version: Ubuntu 14.04

I use hooked web3 to connect my remote server by RPC, but get err: Connection refused.

app.js:5319 OPTIONS http://xxx:8545/ net::ERR_CONNECTION_REFUSED
i.sendAsync @ app.js:5319
finishedWithRewrite @ hooked-web3-provider.js:89
rewritePayloads @ hooked-web3-provider.js:109
next @ hooked-web3-provider.js:119
rewritePayloads @ hooked-web3-provider.js:124
sendAsync @ hooked-web3-provider.js:98
s.sendAsync @ app.js:5319
e @ app.js:5319s.call @ app.js:5319
refreshBalance @ app.js:44083
window.onload @ app.js:44149

Most helpful comment

thank you for your help! i solved my problem by setting --rpcaddr='0.0.0.0'

All 3 comments

Is your node reachable? Try using some simple command line tool to check it. My guess is that your firewall is blocking somewhere. Btw, it's very unhealthy to expose an RPC channel over the internet.

thank you for your help! i solved my problem by setting --rpcaddr='0.0.0.0'

Okay, as karalabe mentioned, be very careful with exposing your RPC interface to the world.
If you have your accounts unlocked they can be abused from the outside, e.g. you could loose your ether or someone can impersonate you.

Was this page helpful?
0 / 5 - 0 ratings