Eureka client instances deregistering and closing Java processes
See original GitHub issueHi,
I have a microservice that is registering with eureka. And I am starting 4 instances of this microservice on 4 different ports. The thing is that after some time, all the instances are deregistering and are shutting down the Java processes. See below excerpts from the logs of the instances:
Instance 1:
2017-09-18 15:04:30.829 INFO 4891 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 15:09:30.830 INFO 4891 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 15:11:14.651 WARN 4891 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1505747474651, current=DOWN, previous=UP]
2017-09-18 15:11:14.652 INFO 4891 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54301: registering service...
2017-09-18 15:11:14.656 INFO 4891 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54301 - deregister status: 200
2017-09-18 15:11:14.657 INFO 4891 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54301 - registration status: 204
2017-09-18 15:11:14.666 INFO 4891 --- [ Thread-5] c.n.h.c.m.e.HystrixMetricsPoller : Stopping the HystrixMetricsPoller
2017-09-18 15:11:14.720 WARN 4891 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-09-18 15:11:14.720 INFO 4891 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
Instance 2:
2017-09-18 15:05:06.791 INFO 4948 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 15:10:06.792 INFO 4948 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 15:11:14.662 WARN 4948 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1505747474662, current=DOWN, previous=UP]
2017-09-18 15:11:14.664 INFO 4948 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54302: registering service...
2017-09-18 15:11:14.680 INFO 4948 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54302 - registration status: 204
2017-09-18 15:11:14.682 INFO 4948 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54302 - deregister status: 200
2017-09-18 15:11:14.695 INFO 4948 --- [ Thread-5] c.n.h.c.m.e.HystrixMetricsPoller : Stopping the HystrixMetricsPoller
2017-09-18 15:11:14.785 WARN 4948 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-09-18 15:11:14.785 INFO 4948 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
Instance 3
2017-09-18 18:09:40.136 INFO 11785 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:14:40.137 INFO 11785 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:19:40.138 INFO 11785 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:24:40.139 INFO 11785 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:25:25.215 WARN 11785 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1505759125215, current=DOWN, previous=UP]
2017-09-18 18:25:25.216 INFO 11785 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54304: registering service...
2017-09-18 18:25:25.220 INFO 11785 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54304 - registration status: 204
2017-09-18 18:25:25.256 INFO 11785 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54304 - deregister status: 200
2017-09-18 18:25:25.268 INFO 11785 --- [ Thread-5] c.n.h.c.m.e.HystrixMetricsPoller : Stopping the HystrixMetricsPoller
2017-09-18 18:25:25.345 WARN 11785 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-09-18 18:25:25.345 INFO 11785 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
Instance 4
2017-09-18 18:09:47.127 INFO 11832 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:14:47.128 INFO 11832 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:19:47.129 INFO 11832 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:24:47.129 INFO 11832 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2017-09-18 18:25:25.243 WARN 11832 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1505759125243, current=DOWN, previous=UP]
2017-09-18 18:25:25.244 INFO 11832 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54305: registering service...
2017-09-18 18:25:25.256 INFO 11832 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54305 - registration status: 204
2017-09-18 18:25:25.269 INFO 11832 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : DiscoveryClient_microservice-instance/host-ip:microservice-instance:54305 - deregister status: 200
2017-09-18 18:25:25.304 INFO 11832 --- [ Thread-5] c.n.h.c.m.e.HystrixMetricsPoller : Stopping the HystrixMetricsPoller
2017-09-18 18:25:25.377 WARN 11832 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-09-18 18:25:25.377 INFO 11832 --- [ Thread-5] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
The configuration that I am using in application.yml:
eureka:
instance:
prefer-ip-address: false
client:
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://IP:port/eureka/
healthcheck:
enabled: true
Might now what the problem would be?
I am using Spring Boot 1.3.3.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Guide to Eureka Self Preservation and Renewal - Baeldung
During the start-up, the clients trigger a REST call with the Eureka server to self-register to the server's instance registry.
Read more >Eureka never unregisters a service - spring cloud
As of now, once the eureka client is started, it registers in 3 seconds. It just never un-registers when the service is abruptly...
Read more >Spring Cloud: Eureka Client registration/deregistration cycle ...
To familiarize myself with Spring Cloud's Eureka client/server mechanism, I try to connect a client to the Eureka server and toggle the connection...
Read more >How to improve the eviction policy in the Eureka Service ...
This post covers a solution to make your Spring Boot app using Eureka and Ribbon react quickly against unavailable services and deregister ......
Read more >DiscoveryClient (eureka-client 1.8.1 API) - Javadoc.io
@Singleton public class DiscoveryClient extends java.lang. ... Eureka Client is responsible for a) Registering the instance with Eureka Server b) Renewalof ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got the same problem. I resolved it by adding this dependency:
Is it related to
eureka.client.healtcheck.enabled? Could you check the response from/healthendpoint?