This state persists for a long time, and access to the service also returns an error, but in the registry interface, the service persists and is up, and after approximately 10 minutes, a line of red characters appears: emergency! EUREKA May is incorrectly claiming instances ARE ' when THEY ' RE not. Renewals ARE Lesser THAN THRESHOLD and HENCE the instances ARE not being expired to be SAFE.
Reason: self-protection mechanism. Eureka server During the run, will count the rate of heartbeat failure within 15 minutes is less than 85%, if there is less than the situation (in a stand-alone debugging is easy to meet, the actual production environment is usually due to network instability), Eureka The server protects the current instance registration information and prompts for this warning.
Workaround:
Add the following configuration to turn off self protection
Eureka Server Application.yml
Eureka:
server:
enableselfpreservation:false
Service application.yml
Eureka:
instance:
leaserenewalintervalinseconds:1
Leaseexpirationdurationinseconds:2