spring-cloud / spring-cloud/spring-cloud-netflix

Open webclient will de-registration failedCannot execute request on any known server

Open
#4,055 2 comments 0 reactions 1 assignee View on GitHub

@OlgaMaciaszek is already working on this.

Since Jan 17, 2022.

bug
Dominant language
Java
Stars
5k
Forks
2.5k
Avg merge
1d 2h
Merged PRs (30d)
10

Description

If the following configuration is added to the configuration, Eureka client cannot be closed normally.
I think it's because webclientbuilder was not created.

eureka:
  client:
    webclient:
      enabled: true

log:

2021-12-26 14:56:56.597  INFO 502590 --- [ionShutdownHook] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:8761/eureka/} exception=event executor terminated; nested exception is java.util.concurrent.RejectedExecutionException: event executor terminated stacktrace=org.springframework.web.reactive.function.client.WebClientRequestException: event executor terminated; nested exception is java.util.concurrent.RejectedExecutionException: event executor terminated
	at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
	Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ Request to DELETE http://127.0.0.1:8761/eureka/apps/CONFIG/192.168.3.101:config [DefaultWebClient]
Original Stack Trace:
		at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
		at reactor.core.publisher.MonoErrorSupplied.subscribe(MonoErrorSupplied.java:55)

2021-12-26 14:56:56.598  WARN 502590 --- [ionShutdownHook] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failed with message: event executor terminated; nested exception is java.util.concurrent.RejectedExecutionException: event executor terminated
2021-12-26 14:56:56.600  WARN 502590 --- [ionShutdownHook] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failed with message: Error creating bean with name 'webClientBuilder' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/function/client/WebClientAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.reactive.function.client.WebClient$Builder]: Factory method 'webClientBuilder' threw exception; nested exception is org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'clientConnectorCustomizer': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
2021-12-26 14:56:56.600 ERROR 502590 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG/192.168.3.101:config - de-registration failedCannot execute request on any known server

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
	at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-1.10.17.jar:1.10.17]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.cancel(EurekaHttpClientDecorator.java:71) ~[eureka-client-1.10.17.jar:1.10.17]


2021-12-26 14:56:56.604  INFO 502590 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.