Eureka not de-registering service

3,471 views
Skip to first unread message

Lee Page

unread,
Sep 16, 2015, 3:12:40 PM9/16/15
to eureka_netflix
Hi Everyone,

I'm currently facing an issue where Eureka does not unregister a registered service. I've pulled the Eureka server example straight from git hub and made only one change to the properties: eureka.enableSelfPreservation = false.

I've read that if 85% of the registered services stop delivering heartbeats within 15 minutes, Eureka assumes the issue is network related and does not de-register the services that are not responding. In my case I have only one service running, so I disabled self-preservation mode. I am abruptly killing the process and Eureka leaves the service registered for what seems like an indefinite amount of time.

My goal is to create a demo where Eureka quickly detects the service is no longer running and another service that is started can quickly register itself.

As of now, once the eureka client is started, it registers in 3 seconds. It just never un-registers when the service is abruptly terminated. After I kill the service, the Eureka dashboard reads:

EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE.


How do I tell Eureka its okay to deregister all services when they stop responding?

Tomasz Bak

unread,
Sep 16, 2015, 3:28:42 PM9/16/15
to eureka_...@googlegroups.com
It looks like your configuration was not read properly. Can you try passing it as system property value (-Deureka.enableSelfPreservation=false). I can see you have spaces around '=' sign. Could you remove them and try again?

--
You received this message because you are subscribed to the Google Groups "eureka_netflix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eureka_netfli...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lee Page

unread,
Sep 16, 2015, 4:34:52 PM9/16/15
to eureka_netflix
I dont actually have spaces around the equal sign, I just typed that instead of copy/pasting it.  I tried passing the system property value as well and about 30 seconds after I kill the service I still get the big red error message.

Tomasz Bak

unread,
Sep 16, 2015, 7:55:26 PM9/16/15
to eureka_...@googlegroups.com
I have just build eureka from the latest sources, and added

eureka.enableSelfPreservation=false

to eureka-server.properties file.

Immediately after the server starts up I can see the following banner on the UI:

RENEWALS ARE LESSER THAN THE THRESHOLD.THE SELF PRESERVATION MODE IS TURNED OFF.THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS.



Lee Page

unread,
Sep 17, 2015, 8:55:38 AM9/17/15
to eureka_netflix
I'm using spring-cloud-starter-eureka-server and it turns out the actual property is eureka.server.enable-self-preservation=false, which I haven't found documented anywhere.  This resolved my issue.
Reply all
Reply to author
Forward
0 new messages