-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Liveness and readiness probes return down when lazy initialization is enabled #35161
Comments
I cannot reproduce it. |
Thanks for trying, @quaff. @Storje, 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. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. Unless the problem is specific to Kotlin, the sample should ideally be written in Java as it removes one possible source of problems. |
Hi, we have updated spring 3.0.6 and appeared to us same problem. |
The issue is when lazy init is enabled. |
I verified health down with spring.main:
lazy-initialization: true
cloud-platform: kubernetes |
Since Spring-Boot 3.0.6 and Spring-Clound 2022.0.2 The problem occurs randomly. On the same service released in a docker environment, one service returns DOWN while the other returns UP
The problem no longer occurs.
it seems that lazy-initialization does not lead to the creation of the necessary beans Problem solved with: |
@wilkinsona here is a sample to reproduce the issue |
Thanks, @Storje. I've yet to figure out why it makes a difference, but the problem can be worked around by preventing the @Bean
fun eagerApplicationAvailabilityBean(): LazyInitializationExcludeFilter {
return LazyInitializationExcludeFilter.forBeanTypes(ApplicationAvailability::class.java)
} |
This is a regression caused by the changes for #34347. The return type of the |
Since Spring Boot 3.0.6, Liveness and Readiness probes return 503 (DOWN)
With this configuration :
The following test is red :
The same test with Spring Boot 3.0.5 is ok.
With 3.0.6, if
spring.main.cloud-platform
is removed, the health probe is ok. When k8s probes are added, the health becomes down.The text was updated successfully, but these errors were encountered: