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

Use REST API for registration in Eureka #3795

Closed
whboyd opened this issue Sep 26, 2016 · 17 comments · Fixed by #3796
Closed

Use REST API for registration in Eureka #3795

whboyd opened this issue Sep 26, 2016 · 17 comments · Fixed by #3796

Comments

@whboyd
Copy link

whboyd commented Sep 26, 2016

It appears that in discovery-first mode, the config client is not updating its location information for the config server when that data changes in eureka (i.e. when a config server instance is removed or added in eureka). Is this currently expected behavior, or am I doing something wrong?

my bootstrap config:

spring:
    cloud:
        config:
            enabled: true
            failFast: true
            discovery:
                enabled: true
eureka:
    client:
        serviceUrl:
            defaultZone: [[my eureka defaultZone]]

When I take down the first config server instance, the configserver healthcheck in the app begins to fail despite there being a second working node registered with eureka. The same occurs if I restart the config server node with a new password in the eureka metadataMap, in which case the client keeps trying to use the old password.

@spencergibb
Copy link
Member

spencergibb commented Sep 26, 2016

spring.cloud.config.discovery.enabled=true is currently built on a one time eureka lookup. It is not built with ribbon (ie a client-side load balancer).

@whboyd
Copy link
Author

whboyd commented Sep 28, 2016

Is this something that you might like to see a PR on?

@spencergibb
Copy link
Member

Yes, we'd want to make sure it's well tested and easy to understand.

@whboyd
Copy link
Author

whboyd commented Sep 29, 2016

I'll give it a shot

@spencergibb spencergibb marked this as a duplicate of #2139 Jul 19, 2017
dyc87112 referenced this issue in dyc87112/spring-cloud-config May 14, 2018
@superwen0001
Copy link

DiscoveryClientConfigServiceBootstrapConfiguration heartbeat event triggers the refresh config. Uri. It holds EurekaClient is old, the EurekaClient should be a singleton, but the introduction of the config is created twice, causing it to refresh for the config address is still not available

@xiaods
Copy link

xiaods commented Oct 14, 2018

any update?

1 similar comment
@vnicers
Copy link

vnicers commented Nov 3, 2018

any update?

@madogao
Copy link

madogao commented Apr 13, 2019

+1 any update?

@ryanjbaxter
Copy link
Contributor

If there was an update it would have been posted here

@lahcloud
Copy link

any update?

@xiaobai1202
Copy link

any update ?

@bberto
Copy link

bberto commented Dec 13, 2019

I think the analysis done here can be useful #3675

During startup a DiscoveryClient is created on bootstrap context and then shut down. Then DiscoveryClient is restarted, but ConfigServerInstanceProvider continues to use the shutdown bean, getting no updates.

This makes discovery-first bootstrap working only if config server is already registered on Eureka when config client starts.

@nikfuri
Copy link

nikfuri commented Mar 15, 2020

I have same issue with ReactiveEurekaDiscoveryClient. It is configured with DiscoveryClient which is used during bootstrap, then this client is shut down and never refresh, and loadbalancer never gets instances updates.

@k631583871
Copy link

You can subscribe to the spring-cloud/spring-cloud-netflix#3675 questi

@spencergibb
Copy link
Member

There's no need to comment on multiple issues. GitHub links them automatically.

@pivotghub
Copy link

I this issue fixed now ? If yes then which version we can follow ?

@OlgaMaciaszek OlgaMaciaszek changed the title discovery data for config server never updates after startup Use REST API for registration in Eureka May 12, 2020
@OlgaMaciaszek
Copy link
Collaborator

Avoid using EurekaClient in order to fix this issue and the following issues in SC Netflix: #3708, #3675.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment