SpringCloud客户端报错:(springcloud 服务发现)

网友投稿 366 2022-07-31


目录微服务启动时报错问题原因解决方案SpringCloud客户端启动报错

微服务启动时报错

2021-05-18 21:25:4http://4.644 WARN 5452 — [tbeatExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: null

2021-05-18 21:25:44.BIJcz644 ERROR 5452 — [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/LAPTOP-3BVBK0KA:service-hi:8763 - was unable to send heartbeat!

问题原因

Eureka客户端无法发送心跳到服务端

解决方案

查看客户端启动类是否添加服务注册、发现注解。

@EnableEurekaClient

@EnableDiscoveryClient

SpringCloud客户端启动报错

·Destroy method on bean with name ‘scopedTarget.eurekaClient’ threw an exception: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘eurekaInstanceConfigBean’: 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!)

Registering application UNKNOWN with eureka with status UP

DiscoveryClient_UNKNOWN/DESKTOP-MQ8D0C9:8761 > - was unable to refrBIJczesh its cache! status = Cannot execute request on any known server

项目启动后自动停止,在控制台没看到启动的端口,估计是没有引入spring boot的web包

在pom文件中引入如下

org.springframework.boot

spring-boot-starter-web

重启解决问题。


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java使用GUI实现贪吃蛇游戏详解
下一篇:HashMap插入相同key问题(hashmap是否存在key)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~