raiden-network / raiden

Raiden Network
https://developer.raiden.network
Other
1.84k stars 378 forks source link

Improve usability of --external_listen_address option #118

Closed utzig closed 8 years ago

utzig commented 8 years ago

When running multiple copies of raiden on a machine that is behind a fw/router, and using independent ports for each running instance, each instance can be started with --external_listen_address host:port.

The problem with the current semantics is that no matter which combination of host:portis passed, the internal listen port will still use the default of 40001.

e.g: If I start two instances with external listen addresses at x.x.x.x:40001 and x.x.x.x:40002 both will try to listen on port 40001 (which makes the one at port 40002 unreachable). A workaround is also passing the --listen_address option with 127.0.0.1:port.

To improve usability I would suggest reusing the current port passed on --external_listen_address for the local socket.

konradkonrad commented 8 years ago

A workaround is also passing the --listen_address option with 127.0.0.1:port

This is not a workaround but the intended way to use it. Side note: if one actually wants to talk to the world, it must be 0.0.0.0:port.

I can see that two listen addresses are confusing/complex for users. But the complexity is there for a reason.The duality is actually a workaround the other way around:

At

But right now, there is no automatic way to configure external port mappings, so users are forced to make a conscious setting here.

Regarding to the experienced "silent failing mode": In the current state I would say raiden should fail at startup, if the configured (explicitly or per default) local socket port is already taken. I don't know, why this is not happening?

konradkonrad commented 8 years ago

I gave this a bit more thought and I believe the problem is a bad naming decision for --external_list_address. The parameter really only is used to update the discovery contract, but it does not (and should not) change any runtime parameters of the raiden service.

How about renaming it to

instead of

Would that make it clearer, that it doesn't change any program settings?

konradkonrad commented 8 years ago

closing in favour of #120