我有一个使用netflix-eureka的大型应用程序,具有许多服务,包括发现服务和api-gateway服务。有时,大约有1/3的时间启动api-gateway-service会导致异常(在代码中有描述)。我们不使用应用程序上下文来调用ctx.refresh()
,所以我不知道发生了什么。
如果需要完整调试日志以及autoconfig的正/负匹配,我可以发布它们,但这很多。
尝试设置获取注册表为true / false,registerWithEureka为true / false
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.guardiananalytics.services.config.EurekaTrustedClientSslConfiguration': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eurekaClientConfigBean' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Initialization of bean failed; nested exception is
java.lang.IllegalStateException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@74f827ad has not been refreshed yet