Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narrow the port range, assigned to monitors and/or clients #47

Open
gikari opened this issue Dec 1, 2020 · 2 comments
Open

Narrow the port range, assigned to monitors and/or clients #47

gikari opened this issue Dec 1, 2020 · 2 comments

Comments

@gikari
Copy link

gikari commented Dec 1, 2020

I'm trying to set up Docker environment with RoboCup server, clients and monitors. Monitor is a GUI app and therefore it cannot be easily run in docker. Because of that, I need to expose some ports of the server, so that is can connect from outside of Docker network.

Unfortunately after the connection to the default 6000 port, the server assigns a new port to the monitor, which is random in a possible range from 30000 to 60000 or may be even more. Because of that fact, I need to bind a lot of ports, when setting up a docker container. This is a very slow operation and because of that I cannot create a docker container in a reasonable time (See also).

To fix that issue, I propose to narrow the port range, which is assigned to the monitor and/or clients. For example a range with 100 ports would be sufficient. It is relatively fast, when running a docker container, to bind them, covers 22 players and additionally a lot of monitors.

If that range is too low for some reason, it would be nice at least make the range configurable.

@hidehisaakiyama
Copy link
Member

As you mentioned, the monitor connection is one of the problems. I'm not so familiar with network programming, I'm not sure assigning the port range is a better solution or not. However, it would be nice we separate the monitor port from the player's one.

Another idea is a proxy client. Now, I'm planning to develop a simple proxy client that transfers the monitor message via TCP/IP.

@bandreghetti
Copy link

bandreghetti commented Feb 27, 2021

@gikari I don't know if you still need it but we have done something very similar in https://github.com/rcssggb/ggb-demo by exposing the X11 server to the container running rcssmonitor using the xhost utility. Feel free to reach out if you have any questions! I also believe an option to limit the port range would be a nice feature to make easier working with rcss in containers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants