Open lihuanyu-java opened 4 years ago
@lihuanyu-java Is this still an issue? If yes, could you share a code snippet to reproduce?
I think we might be hitting the same issue, there seems to be a deadlock between verifyEurekaRegistration()
and Spring Cloud’s CloudEurekaClient.onCacheRefreshed()
as the former blocks the Spring context initialization while the latter is trying to access application listeners.
I’m attaching a thread dump (hazelcast-deadlock.txt).
skipEurekaRegistrationVerification = true
fixes the issue.
edit: forgot to mention this is with Spring Boot 2.6.9, Spring Cloud 2021.0.3 and hazelcast-eureka-one 2.0.1
When I Use Hazelcast reusing Eureka Client (business), I found sometimes when excute EurekaOneDiscoveryStrategy.verifyEurekaRegistration and then eurekaClient.getApplication(business) result was null , My micoservice (this eurekaClient) set health check replace heartbeat(in hearbeat this issue cant't happen) so when starting application ,the Eureka Server can't keep up this new instance is registering,then cause the eurekaClient.getApplication result is null. Do you have any method to slove this issue ? This problem does not occur every time ,Thanks. I find skipEurekaRegistrationVerification paramter can skip this method,I don’t know what the hidden dangers are