SpringCloud客戶端報錯:- was unable to send heartbeat!的解決
微服務啟動時報錯
2021-05-18 21:25:44.644 WARN 5452 — [tbeatExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: null
2021-05-18 21:25:44.644 ERROR 5452 — [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/LAPTOP-3BVBK0KA:service-hi:8763 - was unable to send heartbeat!
問題原因
Eureka客戶端無法發(fā)送心跳到服務端
解決方案
查看客戶端啟動類是否添加服務注冊、發(fā)現注解。
@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 refresh its cache! status = Cannot execute request on any known server
項目啟動后自動停止,在控制臺沒看到啟動的端口,估計是沒有引入spring boot的web包
在pom文件中引入如下
? ? ?<dependency> ? ? ? ? ? ? <groupId>org.springframework.boot</groupId> ? ? ? ? ? ? <artifactId>spring-boot-starter-web</artifactId ? ? ? </dependency>
重啟解決問題。
以上為個人經驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
SpringBoot+BootStrap多文件上傳到本地實例
這篇文章主要介紹了SpringBoot+BootStrap多文件上傳到本地實例,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-03-03

