Hi, I am still dealing with the "Address already in use" exception in springboot 3.2.1. The only problem is, that is actually flaky. The setup is straight forward, two test classes annotated with @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class) randomly fail with the above mentioned exception.
Tried disabling test actuator, same result. I have seen that there were already two issues fixed on the same topic in 3.2.1 but this one is still present.
Tests ran separately never fail, mvn verify is flaky.
Comment From: wilkinsona
This sounds like a different problem if it occurs with Actuator disabled. When you're using RANDOM_PORT the web servers should use an ephemeral port that's allocated by the operating system and is guaranteed to be free. Unfortunately, I don't think we'll be able to diagnose this one without a sample that reproduces it, even if only in a flaky manner.
Comment From: krizajb
Deal, will try my best to somehow extract the project code and make it reproducable.
Comment From: krizajb
Oh a thing I have forgot to mention, its about port 8080, which is actually the app default port. Stacktrace https://gist.github.com/krizajb/802f16ef03ea8e663ce0b5cae1ddcd97
Comment From: wilkinsona
In that case, it sounds like something is causing WebEnvironment.RANDOM_PORT to have no effect. We'll need the previously requested sample to figure out what that is.
Comment From: krizajb
It was wiremock that was running on port 8080. Seems like WebEnvironment.RANDOM_PORT is not having any effect, correct.
Comment From: wilkinsona
Please share a sample and we can take a look.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.