Skip to content

Set hostname property for JMX in spring-boot-maven-plugin #14836

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

Closed
wants to merge 1 commit into from
Closed

Set hostname property for JMX in spring-boot-maven-plugin #14836

wants to merge 1 commit into from

Conversation

goughy000
Copy link
Contributor

This fixes an issue seen on some machines where the local hosts file has none-standard entries. In this case, the build hangs with the following message written to debug until eventually giving up and failing
Spring application is not ready yet, waiting XXms (attempt Y)

In SpringApplicationAdminClient, the connection URL service:jmx:rmi:///jndi/rmi://127.0.0.1 is used, however it's possible that the forked JVM has bound to a different address.

Adding this extra system property helps to ensure that the JVM will bind rmi to the correct interface.

We have previously been adding this as a custom jvmarg in the plugin configuration, but I think it makes sense for it to be part of the plugin

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 15, 2018
@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Oct 15, 2018
@snicoll snicoll self-requested a review October 16, 2018 15:32
@snicoll snicoll added type: bug A general bug and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Oct 17, 2018
@snicoll snicoll added this to the 2.0.x milestone Oct 17, 2018
snicoll added a commit that referenced this pull request Oct 17, 2018
* pr/14836:
  Force JMX hostname to 127.0.0.1
@snicoll snicoll self-assigned this Oct 17, 2018
@snicoll snicoll modified the milestones: 2.0.x, 2.0.7 Oct 17, 2018
@snicoll snicoll closed this in 94770cc Oct 17, 2018
@snicoll
Copy link
Member

snicoll commented Oct 17, 2018

@goughy000 thank you for making your first contribution to Spring Boot. This is now merged in 2.0.x and master.

@goughy000
Copy link
Contributor Author

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants