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

Why the exposed port range is 32768-65535, which is not the same as the range in che.properties? #164

Closed
freewind opened this issue Jan 8, 2016 · 9 comments

Comments

@freewind
Copy link

freewind commented Jan 8, 2016

In the Dockerfile:

# expose 8080 port and a range of ports for runners

EXPOSE 8080 32768-65535

But in /assembly-ide-war/src/main/webapp/WEB-INF/classes/codenvy/che.properties`

# range of available service ports
sys.resources.min_port=49152
sys.resources.max_port=65535

I wonder why the start port is different? And what's usage of the ports between 32768 and 49152?

@TylerJewell
Copy link

We narrow the range of what is exposed so that docker will start in a reasonable time. There is significant overhead for each expert port exposed.

@freewind
Copy link
Author

freewind commented Jan 8, 2016

Is the 32768-65535 in Dockerfile still right? Shall we make the two ranges the same?

@freewind
Copy link
Author

freewind commented Jan 8, 2016

I'm not sure when I start docker image, which range of port shall I use. e.g.

  1. docker run -it --privileged -e DOCKER_MACHINE_HOST=159.203.201.197 -p 8080:8080 -p 49152-49752:49152-49752 codenvy/che:4.0.0-beta-5
  2. docker run -it --privileged -e DOCKER_MACHINE_HOST=159.203.201.197 -p 8080:8080 -p 32768-32788:32768-32788 codenvy/che:4.0.0-beta-5

Shall I start with 49152 or 32768? Or either one is OK?

@TylerJewell
Copy link

No the internal structure is correct. The better answer is to use the --net option. We need to do more testing on that option and its performance before we make that the primary configuration.

@TylerJewell
Copy link

Start with the 32768 but both should be ok.

@freewind
Copy link
Author

freewind commented Jan 8, 2016

@TylerJewell Not quite understand why it's 32768, since it's only exposed in Dockerfile. Does the che program running inside the container have a way to know it? I thought it should get the sys.resources.min_port from che.properties and use 49152

@TylerJewell
Copy link

@eivantsov?

@TylerJewell
Copy link

This should explain it.
https://eclipse-che.readme.io/v4.0/docs/usage-docker#ports

@ghost
Copy link

ghost commented Jan 8, 2016

range of available service ports

sys.resources.min_port=49152
sys.resources.max_port=65535

deprecated. we'll remove it from conf

@ghost ghost closed this as completed Jan 10, 2016
This issue was closed.
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

2 participants