-
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
Update Maven Plugin's documentation to note the importance of configuring start and stop goals with the same JMX port #22401
Comments
It seems it is the same issue as this case here, after research on the web |
Thanks for the report. The problem is with your custom configuration. You have configured the If you want to use a custom for start and stop, you may want to consider configuring it once in the plugin's configuration rather than in each execution's configuration:
I'm going to keep this issue open as I think we could improve the documentation to note the important of the start and stop goals using the same |
Hello Andy, Much appreciated for your detailed answer. So, I moved the property "up":
And after the execution, the process is still hang. |
Unfortunately, it's hard to tell if you're doing something wrong from only a snippet of XML. You could run Maven with |
I understand, make sense. So first, the debug log. As you can imagine, the debug log is quite consequent.
At this point my boot app starts. It is starting no problem, and failsafe is kicking
Is this helpful? By the way, is it possible to have a debug log in stop to say the opposite of [DEBUG] Connected to local MBeanServer at port 7654 ? Something like
or
Thank you for your help. |
The debug output was intended to help you to diagnose the problem. As I said above, if you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. I can see from the debug output that your application has been stopped. If the JVM has not exited then there must be one or more non-daemon threads that are still running and are keeping the JVM alive. That suggests that there's a problem with your application or its configuration as it is starting a thread that isn't cleaned up when the application context is closed. A sample that reproduces the problem would allow us to identify the cause. |
As discovered in #19048 I think we should use this issue to strengthen the fact that the default port could already be taken. This seems to be case more often on Windows. |
I had this problem and I fix it using an older version of the plugin (2.1.6.RELEASE). Luckily it works with the latest Spring Boot version (2.7.0) |
@italktothewind Thanks for trying to help, but mixing versions like that is unsupported and may lead to unexpected problems. |
This is regarding [spring-boot-maven-plugin]
Hello spring-boot-maven-plugin team,
I am here to report what seems to be an issue.
Currently using the latest 2.3.1 spring-boot-maven-plugin plugin, when I run mvn clean install -Pintegration on a project that has the profile, the maven job run successfully, but the process is hang.
I am seeing the success from Maven, and the first run always is a success.
However, on following runs, it is failing, because the previous maven run is blocking/hanging/holding.
Long after I run the maven command, if I lsof -i tcp: 7654, I can still see the process there, and a ps -ef | grep shows
/Library/Java/.../.../Contents/Home/bin/java -Dspring.application.admin.enabled=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7654 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -cp /Users/...
Is I manually kill the process using the port, this get unlocked, and I can do the run one more time, until it is blocked again.
I tried to reproduce on a very small sample to share, however, it seems simple projects are not impacted. My current one is a maven multimode, where the structure is a parent with some common non springboot modules, with other springboot micro services. I want to run the (pre-integration-test) and (post-integration-test) on only one of them. But the issue mentioned is reproducible 100%.
It seems there is an issue where spring-boot-maven-plugin:2.3.1.RELEASE:stop (post-integration-test) can't take care of killing the process.
integration org.springframework.boot spring-boot-maven-plugin 1000 180The text was updated successfully, but these errors were encountered: