Is there a list of ports that I should NOT use?

When I run my tests I create several express instances and bind them to different ports. This happens inside a docker container as part of the testing routine.

My problem is that sometimes a test will start failing stating a connection issue, and then I fix it by changing the port it binds to. Today it was 3036 to 3037 that fixed the issue, and before that it was 3033 to 3036. Note that the error is repeatable until I change the port.

I don’t understand what’s happening here, is there something in the environment that binds randomly in the 3000 range? Is there a list of ports that I shouldn’t use?

3 Likes