Skip to content
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

Eureka client instances deregistering and closing Java processes #2281

Closed
angheladrianclaudiu opened this issue Sep 18, 2017 · 13 comments
Closed

Comments

@angheladrianclaudiu
Copy link

Hi,

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.

@angheladrianclaudiu angheladrianclaudiu changed the title Eureka client instances deregistering and closing Eureka client instances deregistering and closing Java processes Sep 18, 2017
@kylewu
Copy link

kylewu commented Sep 19, 2017

Is it related to eureka.client.healtcheck.enabled? Could you check the response from /health endpoint?

@angheladrianclaudiu
Copy link
Author

angheladrianclaudiu commented Sep 19, 2017

This is the response:

{"description":"Spring Cloud Eureka Discovery Client","status":"UP"}

Also, I had the same issue described above even before I set up eureka.client.healtcheck.enabled.

@ryanjbaxter
Copy link
Contributor

What version of Spring Cloud are you using?

@angheladrianclaudiu
Copy link
Author

Brixton.RC1

@ryanjbaxter
Copy link
Contributor

Can you upgrade to Camden.SR7 or Dalston.SR3?

@angheladrianclaudiu
Copy link
Author

I will give it a try. But will this help? Is there something in the framework that is called behind the scenes that is causing the deregistration from Eureka? I would also like to understand this.

@spencergibb
Copy link
Member

Your using a very old release candidate that is no longer supported. Eureka went through many changes, so indeed, things may have fixed your issue.

@angheladrianclaudiu
Copy link
Author

Ok. Thanks. I will give it a try soon and let you know.

@dulipchandana
Copy link

dulipchandana commented Jul 19, 2018

I got the same problem. I resolved it by adding this dependency:


<dependency>
	<groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-web</artifactId>
</dependency>

@girishgodage
Copy link

thanks dulipchandana . It works for me

org.springframework.boot spring-boot-starter-web

@srinivasvadla
Copy link

Hello Team ,
I was getting the login page when i am hitting the endpoint i no way mentioned the login details ,please help me .

Thank you.

@srivatsanvasishta
Copy link

I got the same problem. I resolved it by adding this dependency:

org.springframework.boot spring-boot-starter-web

Thank you @dulipchandana

@Alexhuihui
Copy link

You are right, thank you @dulipchandana

@spring-cloud spring-cloud locked as resolved and limited conversation to collaborators Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants