我在 OSX BigSur 上,在 VPN 上时出现以下异常。似乎找不到随机端口。我在 JDK 8/11 和 16 上试过。除了不使用 VPN 来运行测试的明显情况。有什么想法吗?
java.lang.IllegalStateException: Could not find an available TCP port in the range [1024, 65535] after 64512 attempts
at org.springframework.util.SocketUtils$SocketType.findAvailablePort(SocketUtils.java:262)
at org.springframework.util.SocketUtils.findAvailableTcpPort(SocketUtils.java:110)
at org.springframework.util.SocketUtils.findAvailableTcpPort(SocketUtils.java:98)
at org.springframework.util.SocketUtils.findAvailableTcpPort(SocketUtils.java:87)
at com.lfg.rps.forms.TestPorts.find the port(Tests.kt:9)