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

Add a method to create a server subprocesses only on unused local ports #1124

Closed
MVrachev opened this issue Sep 9, 2020 · 1 comment · Fixed by #1198
Closed

Add a method to create a server subprocesses only on unused local ports #1124

MVrachev opened this issue Sep 9, 2020 · 1 comment · Fixed by #1198
Labels

Comments

@MVrachev
Copy link
Collaborator

MVrachev commented Sep 9, 2020

Description of issue or feature request:
It will be useful to make sure we are starting the server subprocesses only on unused local ports.
This will save us issues when the server is started on used local ports and given that more tests using server subprocesses could be added in the future, then we have even a better stimulus to create such a method.

It's preferable if we find a way to do this atomically e.g. check if the port is busy and start the server almost instantly because we want to minimize the possibility that that port could be taken between the port validation and server startup.

Current behavior:
There is no such functionality in TUF and sometimes I am getting [Errno 98] Address already in use or ConnectionRefusedError: [Errno 111].

Expected behavior:
Hopefully, none of the above errors will ever appear after we add this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment