Describe the bug After upgrading to spring cloud Hoxton.SR4 and spring boot 2.2.7.RELEASE. Eureka client cannot get service instance list anymore.
Sample The issue happened when application is configured to bootstrap from external configuration service. In such case, the application first bootstrap and a DiscoveryClient bean is created to locate configuration service from Eureka and retrieve external configuration. And then DiscoveryClient instance is shutdown and application restart from external configuration. But legacy DiscoveryClient instance is reused soon afterwards.
Comment From: wangzw
https://github.com/wangzw/eureka-issue-3797 is a demo project to reproduce the issue.
Comment From: spencergibb
Duplicates #3795
Comment From: wangzw
Duplicates #3795
Are you sure it's a duplicated issue with #3795? It is created on 26 Sep 2016 but I found this issue after upgrading spring cloud to Hoxton.SR4. It works well with Greenwich.SR5
Comment From: spencergibb
Yes, we will no longer be creating discovery client in bootstrap
Comment From: wangzw
Yes, we will no longer be creating discovery client in bootstrap
Any reason why it works well with Greenwich.SR5? I spend two days but have no clues which commit introduce this regression and how to fix it. Our application stop working after upgrading. Any suggestion of workaround or fixing?
Comment From: spencergibb
There's not a single reason. I don't know how you can work around this without the fix started in #3796
Comment From: wangzw
So I guess that downgrading to Greenwich.SR5 is the only way before #3796 getting into release. Thanks.