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

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

微服务启动时报错

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>

重启解决问题。

以上为个人经验,希望能给大家一个参考,也希望大家多多支持我们。

(0)

相关推荐

  • spring-cloud-gateway启动踩坑及解决

    目录 spring-cloud-gateway启动踩坑 1.webflux与mvc不兼容 2.webflux使用netty作为容器 3.后来实验了下 很坑得spring cloud gateway 异常 spring-cloud-gateway启动踩坑 本人使用的版本是2.1.2,以下只记录几个小问题,但确实实实在在的把个人恶心的要死要活的找不到办法,几经挣扎,最终解决. 更可恨的是开发的过程中,没有出现异常,后来由于项目组其它人加了依赖,不知不觉对项目的兼容造成了英雄,真的是被撞的头破血流,才

  • 深入理解SpringCloud之Eureka注册过程分析

    eureka是一种去中心化的服务治理应用,其显著特点是既可以作为服务端又可以作为服务向自己配置的地址进行注册.那么这篇文章就来探讨一下eureka的注册流程. 一.Eureka的服务端 eureka的服务端核心类是EurekaBootstrap,该类实现了一个ServletContextListener的监听器.因此我们可以断定eureka是基于servlet容器实现的.关键代码如下: public class EurekaBootStrap implements ServletContextL

  • 解决SpringBoot运行Test时报错:SpringBoot Unable to find

    目录 SpringBoot运行Test时报错 错误详情 解决办法 SpringBootTest单元测试报错 SpringBoot运行Test时报错 运行Test时的报错信息:SpringBoot Unable to find a @SpringBootConfiguration 错误详情 今天做SpringBoot配置邮件发送的时候,运行测试类,报如下错误: 说找不到@SpringBootConfiguration注解,其实是有的,检查了下启动类和被测试类的细节,都没问题,查询的很多CSDN答案

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

    目录 微服务启动时报错 问题原因 解决方案 SpringCloud客户端启动报错 微服务启动时报错 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.net

  • mysql登录报错提示:ERROR 1045 (28000)的解决方法

    本文分析了mysql登录报错提示:ERROR 1045 (28000)的解决方法.分享给大家供大家参考,具体如下: 一.问题: 公司linux系统的mysql数据库root用户设置过密码,但常常用命令'mysql -u root -p'登录报错,有时又能登录.登录报错信息为: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localho

  • pip matplotlib报错equired packages can not be built解决

    pip安装matplotlib 在centos6.5 64bit上用pip安装matplotlib时候报错: * The following required packages can not be built: * freetype, png error: Setup script exited with 1 这是因为pip不能安装操作系统的依赖库导致的,需要用yum手动安装: $ yum -y install freetype-devel libpng-devel 如果不知道这些库需要安装的

  • Python使用pickle模块报错EOFError Ran out of input的解决方法

    本文实例讲述了Python使用pickle模块报错EOFError Ran out of input的解决方法.分享给大家供大家参考,具体如下: 遇到了 EOFError:Ran out of input 不到为什么这样,最后用捕获异常的办法解决掉了,暂时对程序本身没有啥影响,代码如下: # coding=utf-8 import pickle def usr_date(): try: with open('usr_date.pkl','rb') as f: return pickle.load

  • 安装CentOS 6.x报错"Disk sda contains BIOS RAID metadata"解决方法

    今天在安装CentOS6.2的时候,当进到检测硬盘的时候,总是过不去,报错如下: Disk sda contains BIOS RAID metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda 这种情况在Ubuntu,SUSE都有类似的情况,只是提示不太一样. 有时候是sda,有时候是sdb. 感觉是这块硬盘以前是做过raid,现在不认.怎么办. 进入安装选择菜单时 按TAB键,会进入到Linux

  • Maven install 报错"程序包不存在"问题的解决方法

    概述 在mvn clean install时,控制台各种报错,大概有: java:[8,52] 程序包com.xxx不存在 java:[98,27] 找不到符号 符号: 类 XXX 位置: 类XXX [ERROR] COMPILATION ERROR : Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure  at org.apache.maven.plugin.c

  • Python报错:PermissionError: [Errno 13] Permission denied的解决办法

    问题描述: 我一直用python处理气象数据,之前写过一个处理气象数据的程序,一直都可以用的,可是昨天我再想处理数据的时候提示我如下错误 Traceback (most recent call last): ...中间忽略 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xarray\backends\file_manager.py", line 205,

  • 安装CentOS 6.x报错"Disk sda contains BIOS RAID metadata"解决方法

    今天在安装CentOS6.2的时候,当进到检测硬盘的时候,总是过不去,报错如下: Disk sda contains BIOS RAID metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda 这种情况在Ubuntu,SUSE都有类似的情况,只是提示不太一样. 有时候是sda,有时候是sdb. 感觉是这块硬盘以前是做过raid,现在不认.怎么办. 进入安装选择菜单时 按TAB键,会进入到Linux

  • Mysql数据库delete操作没报错却删除不了数据的解决

    1.在操作页面执行删除操作,但没有删除成功,删除过程无报错(以下为删除操作的控制台日志) 2.在数据库执行删除操作 表数据 执行删除语句删除staffId为3的数据 结果却没有删除成功 3.原因 staffId为3的数据的flag为Null,虽然delete from staff where staffId=3 and flag != 1语句中的flag != 1说明了删除除1以外的数据,但却没有删除flag为Null的数据 4.解决办法 把staffId为3的flag置为0 再次执行delet

  • MySQL报错:sql_mode=only_full_group_by的4种轻松解决方法(含举例)

    目录 前言​ 方法一:直接修改数据库配置 方法二:修改数据库配置(永久生效) 方法三:使用 any_value() 或 group_concat() 方法四:开动脑筋,修改代码 总结 前言​ 作为初学者,我们在使用MySQL的时候总是会遇到各种各样的报错,让人头痛不已.其中有一种报错,sql_mode=only_full_group_by,十分常见,每次都是老长的一串出现,然后带走你所有的好心情 出现这样的报错,并不是因为你的代码写得不好,而是因为在MySQL 5.7后,MySQL默认开启了SQ

随机推荐