VSOS
VSOS

Reputation: 574

Spring-boot 2.0.0 M1 - Actuator not working

I have a Spring-boot project that uses spring-boot actuator to provide application statistics and metrics.

The actuator functionality is being provided by adding "spring-boot-starter-actuator" to the project.

At this point, security is disable, so the project does not import spring-security.

Using spring-boot 1.5.x, all actuator Endpoints (automatic provided, as the /info, as well as my specific defined endpoints), are working correctly.

After updating to Spring-boot 2.0.0 M1, the actuator endpoints are no longer exposed. Invoking the /info endpoint returns the following error:

{"timestamp":1496948526890,"status":404,"error":"Not Found","message":"No 
message available","path":"/info"}

A note regarding Tomcat: i'm redefining the tomcat.version property, in order to use version 9.

Upvotes: 4

Views: 6921

Answers (4)

ncc0706
ncc0706

Reputation: 31

try this

management: endpoints: web: exposure: include: '*' base-path: /actuator

Upvotes: 3

Erik Pragt
Erik Pragt

Reputation: 14617

And it's moved again. Right now, the URL are living under /actuator, for example: /actuator/health.

See https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-endpoints

Upvotes: 7

Ricardo Pina Arellano
Ricardo Pina Arellano

Reputation: 61

Even you could define a specific path using the management attribute:

management.context-path =

If you set an empty space, you can reach "/info", as you want.

Upvotes: 2

Darren Forsythe
Darren Forsythe

Reputation: 11411

It look's like the endpoint is no longer mapped to /info

2017-06-08 13:11:57.817 [main] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/application/info || /application/info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()

and according to the 2.0.0/SNAPSHOT documentation this is expected.

https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-endpoints

Try /application/info

Upvotes: 6

Related Questions