Go-ethereum: Fatal: Error starting RPC: listen tcp xx.xx.xx.xx:xxxx: bind: cannot assign requested address

Created on 17 Oct 2015  路  8Comments  路  Source: ethereum/go-ethereum

Linux Debian x64. I'v compiled geth, started it this way:

su -m ethuser -c '/eth/geth -rpc -rpcaddr=xx.xx.xx.xx -rpcport=xxxx'

And got this error:

1016 23:22:31.272868 28300 http.go:96] Can't listen on xx.xx.xx.xx:xxxx: listen tcp xx.xx.xx.xx:xxxx: bind: cannot assign requested address
Fatal: Error starting RPC: listen tcp xx.xx.xx.xx:xxxx: bind: cannot assign requested address

I tried different ports - same error.

Most helpful comment

Then feature request!
-rpcallowip= like bitcoin has!

All 8 comments

If you specify a listening address, one of the network interfaces on the machine must have that address.

Would be good to know what you are trying to do.

fjl, thanks for answer.
I'm trying to specify IP address of my server from where only I want to be able to access wallet's RPC
Looks like I'm mixing up specification of local address and remote address. I see now. But how can I limit access to wallet server from specific IP only?

Things you can do:

  • Use the firewall (iptables, etc.) to limit access to a certain source IP range.
  • Run geth with --rpcaddr=127.0.0.1 (the default) and put a proxy such as nginx in front of it. Configure IP-based access control with nginx or use SSL with client certificates. I'd recommend the latter if you want access via the Internet.

Then feature request!
-rpcallowip= like bitcoin has!

I am facing the same error while providing public IP in --rpcaddr, please help

Error is: Fatal: Error starting protocol stack: listen tcp xx.xxx.xxx.xxx:8552: bind: cannot assign requested address

If you specify a listening address, one of the network interfaces on the machine must have that address.

Is that really an address on your interface @mohitsharma18?

yes @holiman,

my node-js application is running on that address, but when I start geth with it, it throws the error, also port is open for the IP

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tymat picture tymat  路  3Comments

bgrieder picture bgrieder  路  3Comments

vogelito picture vogelito  路  3Comments

VoR0220 picture VoR0220  路  3Comments

ysqi picture ysqi  路  3Comments