-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Problem with metrics end points #1059
Comments
I forgot to say that i also have this management.health.circuitbreakers.enabled: true resilience4j.circuitbreaker: resilience4j.ratelimiter: |
Hi @esteve8 management.endpoints.web.exposure.include: ["metrics", "prometheus", "circuitbreakers", "circuitbreakerevents"] |
Hello @dlsrb6342 !! Nice to meet you :) opps, you're right! now i have this error starting the app: Description: Parameter 2 of method circuitBreakersHealthIndicator in io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakersHealthIndicatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.HealthAggregator' that could not be found. Action: Consider defining a bean of type 'org.springframework.boot.actuate.health.HealthAggregator' in your configuration. |
Which Spring Boot 2 version do you use? |
the 2.2.7.RELEASE |
Please update to Resilience4j 1.5.0 |
Now the message has changed: Parameter 2 of method circuitBreakersHealthIndicator in io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakersHealthIndicatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.StatusAggregator' that could not be found. Action: Consider defining a bean of type 'org.springframework.boot.actuate.health.StatusAggregator' in your configuration. |
Sry I was wrong. Resilience 1.5 requires Spring Boot 2.3.x |
And with 2.2.7.RELEASE of spring boot what version is the best of Resilience? included for manage the actuators healths, metrics etc |
The demo currently uses Spring Boot 2.2.4 and Resilience 1.4 |
Now i just have the configuration like you say but i still have the error :( Parameter 2 of method circuitBreakersHealthIndicator in io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakersHealthIndicatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.HealthAggregator' that could not be found. Where i can define the HealthAggregator bean?? thanks so much for your help |
It should be configured by spring-boot-actuator-autoconfigure which is included in spring-boot-starter-actuator. Could you change
|
hi @dlsrb6342! i did it like you said: api "org.springframework.boot:spring-boot-starter-actuator" But i have the same error: onfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'circuitBreakersHealthIndicator' defined in class path resource [io/github/resilience4j/circuitbreaker/autoconfigure/CircuitBreakersHealthIndicatorAutoConfiguration.class]: Unsatisfied dependency expressed through method 'circuitBreakersHealthIndicator' parameter 2; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.actuate.health.HealthAggregator' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} i don't undestand what is the problem :( |
Can you provide a sample that reproduces the problem as a GitHub (or similar) project or attached to this issue as a zip file? |
hello! the problem is that I have a microservices architecture with many modules and it is difficult to extract the problem to a simple project because the conditions will not be the same.. I can show you the microservice gradle.properties that uses the circuit breaker. Can it be useful to you? I really appreciate your help. https://drive.google.com/file/d/1N2O1kGgIJ0t6h3gFL2sLy2uBdIcQnGUd/view?usp=sharing |
I tested with following plugins {
id 'org.springframework.boot' version '2.2.7.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'io.github.resilience4j:resilience4j-spring-boot2:1.4.0'
implementation 'io.micrometer:micrometer-registry-prometheus'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'io.projectreactor:reactor-test'
}
test {
useJUnitPlatform()
} |
thanks! i'm gonna check :) |
One question, if i don't add:
I got this error: The method's class, io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry, is available from the following locations:
|
I guess you have a dependency to the Spring Cloud Dependency pom? |
Yes, dependencyManagement { Maybe thats the reason because i have so many problems? what is your recommendation, exclude the circuit breaker dependencies from org.springframework.cloud:spring-cloud-dependencies? |
Hello! do you have any idea how to fix it @RobWin @dlsrb6342 ? |
@esteve8 So in in your dependency management of the spring cloud , u need to set implicitly the resilience4j version u will use temporary till they do it in their side , example in maven :
|
ahh makes sense! i will try your solution, thaks so much! @Romeh |
Hello again @Romeh I tried to put: dependencyManagement { with this dependences: implementation ("io.github.resilience4j:resilience4j-spring-boot2:1.5.0") But i still got this error: Parameter 2 of method circuitBreakersHealthIndicator in io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakersHealthIndicatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.StatusAggregator' that could not be found. Action: Consider defining a bean of type 'org.springframework.boot.actuate.health.StatusAggregator' in your configuration. Any idea will be appreciated |
@esteve8 can u please check out that sample and compare with ur setup ? |
I compared but i can't see relevant diffs, do you know what lib or class i need for fix the error? why this error happens? @Romeh |
@esteve8 can u share your gradle build file for review ? meanwhile u do not need to define twice : it comes transitively from spring cloud with the version ur override there. Also i see u mix 1.5 with 1.4 in ur dependencies : |
Hi @Romeh I uploaded for you the build.gradle to my drive account: https://drive.google.com/file/d/1R4UN57xedbRcw0ge0bqnog-LYUoymV_R/view?usp=sharing Do you see any mistake? Thanks so much for your help |
If i don't put the 1.4, by default gets me de 1.1 and it's too old.. I updated to 1.5 all the dependencies but i still have the same error. |
I got this same error in the following versions.
However, it was solved by adding the following option: management.endpoint.health.enabled=true |
I had the same problem. Whatever versions combination I tried for spring boot and resilience4j - had no luck until finally I removed this property: management.health.circuitbreakers.enabled: true so now I reached my goal to have |
I also facing a similar problem with Resilience4j 1.7.1 Parameter 2 of method circuitBreakersHealthIndicator in io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakersHealthIndicatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.StatusAggregator' that could not be found. |
Resilience4j version: 1.4.0
Java version: 11
hello! i have a problem with the end points for metrics, for me doesn't work these 3 end points
/actuator/circuitbreakerevents
/actuator/metrics
/actuator/prometheus
My config
Do you need an extra configuration?
Best regards
The text was updated successfully, but these errors were encountered: