HpBandSter icon indicating copy to clipboard operation
HpBandSter copied to clipboard

Add support for workers running behind a NAT router

Open gchlebus opened this issue 4 years ago • 2 comments

The worker currently registers itself with the nameserver using its internal location, which causes problems (i.e., the worker is not accessible from outside) when the worker runs behind a NAT router. These scenario can happen when workers run within separate docker containers started without the --net=host option. After looking at the Pyro4 documentation [1], I think that the solution could be to add nathost and natport parameters to the Worker class, which would be passed to the Pyro4.core.Daemon object. This would ensure, that the worker process would register itself with the external address.

[1] https://pythonhosted.org/Pyro4/tipstricks.html#pyro-behind-a-nat-router-firewall

gchlebus avatar Jan 21 '20 10:01 gchlebus

Hey there. Is there any progress in this issue? I would also be quite interested to run an optimization within several docker containers without using the --net option.

totifra avatar May 04 '20 13:05 totifra

I added support for workers running behind a NAT router in this PR.

gchlebus avatar Jun 15 '20 19:06 gchlebus