-
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
BeanCreationNotAllowedException on shutdown for EurekaDiscoveryClientConfiguration #1064
Comments
You've got WARN and INFO logs there, so probably you can just ignore them, or shut them off by disabling the loggers. If you have a crisp way to reproduce the problem with a simple sample project in github maybe we can analyse it in a bit more detail. |
I get the same error and the application refuses to start in Eclipse and also Integration tests fails because of same error. This is an issue to look into. |
Which application are you talking about? If you have a sample, please share a link. |
Hi Dave,
The cause of mentioned exception is in method org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration.onApplicationEvent(ContextClosedEvent event) line 188 according to http://docs.spring.io/spring/docs/2.5.x/reference/beans.html#context-functionality-events the ContextClosedEvent called when all singletones destroyes, but the ApplicationListenerMethodAdapter trying to instantiate wrapped bean for handling ContextClosedEvent and this cause exception. Is it worth to replace ContextClosedEvent with ContextStoppedEvent for EurekaDiscoveryClientConfiguration.onApplicationEvent ? |
Can anyone on this thread provide a sample application? |
first execute 'gradle bootRun' in test.eureka, after eureka started - run 'gradle bootRun' in test.shtdwn PS: if using eclipse - just import projects and run as boot app in same order. |
Updated docs link since we're in 4.3.x (vs 2.5.x) http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#context-functionality-events |
I have the same issue when calling the /shutdown Actuator endpoint |
The issue is due to the following:
At least that's how we understood the issue here... If this analysis happens to be correct, then it is likely you will provide a solution to #1534 at the same time. |
This issue seems to be related to spring-cloud-samples/feign-eureka#6. After I removed the FeignClients Annotation from the Application, the error seems to be gone. |
See #1952 . The root cause should be the same. |
I see that #2087 fixes this. Will this make it into a Dalston SR release. |
#2087 is in |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Am using 1.4.4.RELEASE version of below dependecies and still i see this issue.
|
I wouldn't expect #2087 to affect this necessarily. We would need to move the |
The issue still exist in Finchley.SR1. The issue seems cosmetic and you are shutting down the app but the side effect is severe. The issue is failing to send "STOP" request to eureka server; as a result the dead app instance will still be registered in Eureka server longer than it suppose to be. Here is the line from the log.......... |
I've got a Spring-Boot-Parent defined in my pom.xml like this:
I annotated my Application-Class like this:
Then I've got an FEIGN interface defined like this:
Then I've got service-class like this:
Then I've got a test-class defined like this:
If I run the test everything is doing fine, but after the test has been run and the spring application is shutdown I received this ugly exception:
Is there any way to avoid this exception?
The text was updated successfully, but these errors were encountered: