2

Following the guidance here in the Spring Boot docs and having Actuator in the deps + this in main:

public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Thing2Application.class);
    app.setApplicationStartup(new BufferingApplicationStartup(2048));
    app.run(args);
}

The /actuator/startup endpoint is present and populated when running as a standard, JVM-based (WebFlux/RSocket) app, but not when using buildpacks to create a native image. It simply doesn't appear, no indications present.

Is /startup not yet available when creating native Boot apps? If it is, please advise of any additional steps I may have missed exposing it. If not, please let me know and I'll log a request. Thanks!

Mark Heckler
  • 126
  • 1
  • 7
  • This endpoint is not enabled by default in all environments. Did you enable it with the configuration property ˋmanagement.endpoint.health.probes.enabled=trueˋ ? – Brian Clozel Jun 17 '21 at 19:18
  • Hi Brian! That isn't documented anywhere I can find in the docs link above (or anywhere else I can find), but I did give it a try. Still no startup endpoint when running as a native app. :/ – Mark Heckler Jun 18 '21 at 20:38
  • You must have more than what you've described for the endpoint to work in JVM mode. Re "It isn't documented anywhere": https://github.com/spring-projects/spring-boot/issues/26978. Actuator is fairly limited still with Native. Feel free to create an issue and please attach a sample project. – Stephane Nicoll Jun 19 '21 at 05:22
  • Hi Stephane, great to hear from you too! I really don't have more in there than described...the only props in application.properties are server.port, spring.rsocket.server.port, and management.endpoints.web.exposure.include=* (for demo purposes only, of course). Other than the deps for WebFlux & RSocket, it's a very basic project. I'll open an issue and provide a link to a repo. Thanks for looking into it. – Mark Heckler Jun 20 '21 at 19:32
  • Just noticed your other point (sheepish grin). @stephane, I still don't see anywhere in any of the links within the one you shared a reference to the property Brian pointed out, ˋmanagement.endpoint.health.probes.enabled=trueˋ. That's what I meant when I said "That isn't documented anywhere I can find in the docs link above..." Irrelevant since it didn't affect the outcome, but if a property is required to enable a feature, wouldn't it make sense to include that in the docs? Thanks! – Mark Heckler Jun 20 '21 at 20:57
  • My bad, for some reason I read "liveness" in your question - so please disregard my first comment as it was out of scope. At this point, I think that a sample application showing the issue here would help https://github.com/spring-projects/spring-native/issues Thanks! – Brian Clozel Jun 21 '21 at 07:18
  • Hi @BrianClozel, no worries, and thank you for closing the loop on this & getting the issue where it needs to be for resolution. Just to keep everything in sync for anyone searching SO for similar issues, here is the repo I submitted demonstrating the logged behavior: https://github.com/mkheck/spring-boot-actuator-startupendpoint-nativecode-issue Here is the issue I filed originally for Actuator: https://github.com/spring-projects/spring-boot/issues/27004 And here is the Spring Native issue: https://github.com/spring-projects-experimental/spring-native/issues/851 Again, thank you! – Mark Heckler Jun 22 '21 at 14:23

1 Answers1

0

That is a Spring Native bug that is being tracked in this issue.

Stephane Nicoll
  • 31,977
  • 9
  • 97
  • 89