-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
TomcatWebServer stop doesn't close sockets for additional connectors #38564
Comments
For some reason, after
Interestingly, the connector for port 8080 has closed the listening socket. In |
In // Don't bind to the socket prematurely if ApplicationContext is slow to start
connector.setProperty("bindOnInit", "false"); When adding this property to the 8010 connector, all tests pass. |
That points towards dbb2428 as being the cause. A |
Hi, without wanting to put pressure, this is absolutely not my intention, but just because I want to understand: so we wait until release 3.2.1 until this is fixed, is that correct? Best regards from Hamburg! |
Yes. It will be released on 21th of December, see the calendar or the milestone. |
Thanks for the link, I'll save it for future reference. Best wishes and have a nice day! |
I'm still seeing this in 3.2.1 & 3.2.2. |
@jamfor352 Without anything more to go on, we can only assume that you have a different problem as we believe that this one has been resolved. Please open a new issue that describes your situation in more detail and that provides a minimal example that reproduces it. |
Sorry for the lack of feedback - but just to let you know - we have been upgrading our repository to spring boot 3.2.1 and the tests were executing as expected. So this issue seems fixed for me. |
Greetings!
As stated in this seemingly unrelated ticket #38554 we are currently facing an issue when running multiple Spring boot tests one after another.
i took the liberty and created a reproducer for this case. The tests in the attached zip file work with spring boot 3.1.5 but fail on 3.2.0.
In my example I add a new http connector with a fixed port. When running each test on its own they work. But if they're executed in a row i.e. by a mvn verify the second tests fails on initialization stating that the configured connector failed to start.
Maven doesn't print the reason too clearly unfortunately but a little closer investigation inside a IDE reveals the java.net.BindException: Address already in use: bind exception.
SpringTestReproducer.zip
In this example also the "@DirtiesContext" doesn't help. It seems as if the Spring / ApplicationContext is cleaned up and the new server instance is going to boot but the old instance of the server hasn't shut down yet or isn't shutting down at all.
Thanks in advance!
The text was updated successfully, but these errors were encountered: