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

Containers might fail to expose port during the startup #843

Open
project-administrator opened this issue Mar 4, 2021 · 0 comments
Open

Comments

@project-administrator
Copy link
Contributor

project-administrator commented Mar 4, 2021

For example, the sidetree-mock component uses the following port number: 48326
In Linux, however, by default ephemeral port range is from 32768 to 60999: https://en.wikipedia.org/wiki/Ephemeral_port
This means that any random port in this range may already be in use for the outgoing TCP connection by some app running on the system (e.g. by the browser).
When this is the case, any container which is set to expose that port will fail to start.
This does not happen often, but this causes some random container start failures.

This should at least be documented. Ideally, ports from the ephemeral range (32768 to 60999) should not be used.
As a temporary workaround, on Linux users can modify their ephemeral port range:
sudo sysctl net.ipv4.ip_local_port_range='49152 65535'

@project-administrator project-administrator changed the title Avoid using ports from ephemeral range Containers may fail to start randomly on Linux Mar 4, 2021
@project-administrator project-administrator changed the title Containers may fail to start randomly on Linux Containers might fail to start randomly on Linux Mar 4, 2021
@project-administrator project-administrator changed the title Containers might fail to start randomly on Linux Containers might fail to expose port during the startup Mar 5, 2021
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

1 participant