SpringCloud客户端报错:- was unable to send heartbeat!的解决

作者:爱叨叨的程序狗 时间:2021-08-13 14:08:11 

微服务启动时报错

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客户端无法发送心跳到服务端

解决方案

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

@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>

重启解决问题。

来源:https://blog.csdn.net/weixin_42313773/article/details/117001399

标签:SpringCloud,客户端,报错,heartbeat!
0
投稿

猜你喜欢

  • Java中抽象类与方法的重写方式

    2023-08-25 09:20:29
  • SpringBoot MongoDB与MongoDB GridFS基本使用

    2023-07-31 06:26:47
  • Android开发两个activity之间传值示例详解

    2023-11-27 20:00:45
  • SpringBoot整合第三方技术的详细步骤

    2023-11-29 08:22:48
  • Gradle属性设置及环境变量全面教程

    2023-08-10 18:20:51
  • Android Studio 通过登录功能介绍SQLite数据库的使用流程

    2023-09-22 00:37:29
  • mybatis多表查询的实现(xml方式)

    2021-07-11 01:21:38
  • 深入解析java中的locale

    2023-11-09 18:14:20
  • Android APK反编译图文教程

    2022-02-04 01:46:46
  • c# 控件截图的简单实例

    2022-01-21 16:43:19
  • Java实现登录与注册页面

    2023-04-17 03:21:20
  • Java实现简易学生管理系统

    2022-10-16 19:26:49
  • 利用Java生成带有文字的二维码

    2022-05-21 15:01:38
  • SpringCloud-Alibaba-Nacos启动失败解决方案

    2023-12-19 05:34:45
  • C#实现系统休眠或静止休眠的方法

    2023-12-19 01:55:29
  • SpringMVC之AbstractAnnotationConfigDispatcherSer解读

    2023-06-21 21:42:32
  • java 抽象类的实例详解

    2023-06-08 05:52:40
  • Spring中实现定时调度的几种方法

    2021-08-29 13:04:44
  • 基于JavaMail的Java邮件发送

    2022-10-30 18:56:56
  • 详解spring boot配置单点登录

    2022-07-27 11:50:11
  • asp之家 软件编程 m.aspxhome.com