-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Issue with Eureka DiscoveryClient with latest 2022.0.3-SNAPSHOT (4.0.2-SNAPSHOT) #4177
Comments
Which app has that error? |
microservice-2022-0-3 |
`microservice-2022-0-2` log (working OK):
`microservice-2022-0-3` log (has isssues):
|
Thank you so much for the report. I'll change the missing classes to check for the client implementation rather than the API which is still required. I'll also exclude the client impl rather than the api. |
No problems! :) |
Is this issue fixed? I am still getting this issue in version 2022.0.2 with spring boot 3.0.6 |
It's fixed in 2022.0.3 |
@spencergibb This fix broke our application after updating from
Our application is a mix of spring-boot web application and our internal core that relies on Grizzly and therefore ships As a workaround I created the following configuration class
Basically, I want the default behavior and need to duplicate the Spring code just with reversed conditions. Is there a better way to make this work and is there some documentation of it? I couldn't find one ... Thx. |
@spencergibb any feedback is appreciated. |
Having the same now with 2022.0.4. All fine still with 2022.0.2 |
SpringCloudVersion 2023.0.0, SpringBoot 3.2, Java 17 I'm following this tutorial @SpringBootApplication
public class ServiceRegistrationAndDiscoveryClientApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceRegistrationAndDiscoveryClientApplication.class, args);
}
}
@RestController
class ServiceInstanceRestController {
@Autowired
private DiscoveryClient discoveryClient;
@RequestMapping("/service-instances/{applicationName}")
public List<ServiceInstance> serviceInstancesByApplicationName(
@PathVariable String applicationName) {
return this.discoveryClient.getInstances(applicationName);
}
} and got this error messages
how can i fix this? |
@Dev-Hammy I am unable to reproduce using the guide and the complete version upgraded to the latest versions or boot and cloud. If you'd like us to spend some time investigating, please take the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to a new issue or git clone, build, and deploy) that reproduces the problem. |
1. The complete version of the tutorial sample codeThank you for responding to my inquiry. This is the complete code provided on the tutorial page. gs-service-registration-and-discovery-main.zip 2. I got same structure and contents here :In
In
3. but different
|
Simple reproducer: Add spring-boot-starter-jeresey Auto configuration report:
Eureka Server fixes this as follows (EurekaServerAutoConfiguration):
Reproducer repo: https://github.com/ZIRAKrezovic/eureka-reproducer
|
Possible fix. Mentioned Eureka Server fix comes from eureka-client-jeresey library. So, all the conditionals should be changed to check from |
Fix, v2: Add
Add:
Change existing conditionals from |
- Add dependencies spring-cloud-starter-netflix-eureka-client and eureka-client-jersey3 - Configure the Eureka client - Implement workaround for Eureka DiscoveryClient based on spring-cloud/spring-cloud-netflix#4177 (comment)
It seems that there is some issue because of changes from df9e581 made for #4176
With last 2022.0.3-SNAPSHOT build:
I have tried to add 'jakarta.ws.rs:jakarta.ws.rs-api' dependency but then application won't start at all:
Sample to reproduce with Spring Boot 3.1.0 is at https://github.com/ztomic/spring-cloud-netflix-issue
discovery-server
is Eureka servermicroservice-2022-0-2
is Eureka client with Spring Cloud 2022.0.2microservice-2022-0-3
is Eureka client with Spring Cloud 2022.0.3-SNAPSHOTYou can run all of them,
microservice-2022-0-3
will log errors and warnings mentioned above.microservice-2022-0-2
will run normally.The text was updated successfully, but these errors were encountered: