在SpringCloud中Server端启动成功了,再去启动Client项目,可能会出现这样的问题,Console日志如下:

2022-06-22 16:04:41.990  INFO 14964 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:9001/
2022-06-22 16:04:42.560  INFO 14964 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config, profiles=[test], label=master, version=28afd1f94d37c7a7fc60e402dab302bb178fae5c, state=null
2022-06-22 16:04:42.560  INFO 14964 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-https://gitee.com/llongtong/zeno-training-platform-config.git/file:C:\Users\SAMSUNG\AppData\Local\Temp\config-repo-7871456846147239475\config-test.yml'}]
2022-06-22 16:04:42.576  INFO 14964 --- [           main] com.zeno.ConfigClientTestApplication     : No active profile set, falling back to default profiles: default
2022-06-22 16:04:42.866  INFO 14964 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=788e2244-e364-3193-959b-c9162cfcdae6
2022-06-22 16:04:43.971  INFO 14964 --- [           main] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate.
2022-06-22 16:04:44.845  WARN 14964 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2022-06-22 16:04:44.892  INFO 14964 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2022-06-22 16:04:44.923  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2022-06-22 16:04:44.923  INFO 14964 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2022-06-22 16:04:44.939  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2022-06-22 16:04:45.111  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2022-06-22 16:04:45.111  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2022-06-22 16:04:45.111  INFO 14964 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2022-06-22 16:04:45.111  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1655885085111 with initial instances count: 3
2022-06-22 16:04:45.111  INFO 14964 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application CONFIG-CLIENT with eureka with status UP
2022-06-22 16:04:45.111  INFO 14964 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1655885085111, current=UP, previous=STARTING]
2022-06-22 16:04:45.126  INFO 14964 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG-CLIENT/LONGTONG.mshome.net:config-client:8453: registering service...
2022-06-22 16:04:45.126  INFO 14964 --- [           main] com.zeno.ConfigClientTestApplication     : Started ConfigClientTestApplication in 5.828 seconds (JVM running for 8.011)
2022-06-22 16:04:45.142  INFO 14964 --- [ionShutdownHook] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application CONFIG-CLIENT with eureka with status DOWN
2022-06-22 16:04:45.142  INFO 14964 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1655885085142, current=DOWN, previous=UP]
2022-06-22 16:04:45.142  INFO 14964 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2022-06-22 16:04:45.173  INFO 14964 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG-CLIENT/LONGTONG.mshome.net:config-client:8453 - registration status: 204
2022-06-22 16:04:45.173  INFO 14964 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG-CLIENT/LONGTONG.mshome.net:config-client:8453: registering service...
2022-06-22 16:04:45.173  INFO 14964 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG-CLIENT/LONGTONG.mshome.net:config-client:8453 - registration status: 204
2022-06-22 16:04:45.173  INFO 14964 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : Unregistering ...
2022-06-22 16:04:45.173  INFO 14964 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CONFIG-CLIENT/LONGTONG.mshome.net:config-client:8453 - deregister  status: 200
2022-06-22 16:04:45.189  INFO 14964 --- [ionShutdownHook] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClientProcess finished with exit code 0

其中,出了问题的大概可以从这里排查。 

前面显示注册成功了,现在立马又开始倒戈。这是由于可能SpringWeb依赖是继承父模块的,所以我们这个模块里没有写Web依赖。

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId>
</dependency>

在我们这个模块pom文件里加上web依赖就搞定了。

SpringCloud中Client向Eureka注册中心注册服务成功后不久就Unregistering(Unregistering application 服务名 with eureka with)相关推荐

  1. 注册中心—注册中心原理

    在微服务架构中,注册中心是最核心的基础服务之一,本文将详细介绍下注册中心的组成部分和它们之前的关系. 目录 一.注册中心原理 二.注册中心功能 三.常见的注册中心 一.注册中心原理 注册中心主要涉及到 ...

  2. spring cloudAlibaba gateway网关报错,显示无法找到注册中心注册自己。

    spring cloudAlibaba gateway网关报错,显示无法找到注册中心注册自己. 1.错误提示 2020-12-29 11:10:18.521 WARN 232 --- [freshEx ...

  3. python 使用nacos 注册中心 注册服务

    python 使用nacos 注册中心 注册服务 最近一段时间要将自己写的flask 项目 作为一个微服务,因为这边java 使用的nacos 为注册中心. 所有便简单实现了一下 . https:// ...

  4. Consul注册中心注册的服务总是红叉 (All service checks failing)

    Consul注册中心注册的服务总是红叉 (All service checks failing) Consul注册中心注册的服务总是红叉 (All service checks failing) 因为 ...

  5. spring-cloud开发微服务笔记(二):高可用Eureka注册中心的搭建与RestTemplate和Fengin客户端调用微服务示例

    引言:这一篇博客是将上一篇spring-cloud-eureka-server的单机模式改为集群模式,体现eureka的高可用特性.生产环境无论是Eureka注册中心还是Client客户端大多是部署在 ...

  6. 通过Maven将一个dubbo服务打包成可执行的jar包,并向注册中心注册服务

     1.向pom.xml里面添加如下代码: dubbo-Service${project.build.directory}/classessrc/main/resourcestrue**/*.prope ...

  7. java项目(注册和登录(成功后查看商品的信息))

    文章目录 声明 第一步: 第二步: 第三步: 第四步: 第五步 第六步: 第七步: 声明 题目:实现登录和注册功能 登录成功后可以查看所有商品的信息(商品名称,价格,销量) 第一步: package ...

  8. 禁止本地服务dubbo、nacos服务法宣向注册中心注册

    dubbo.registry.register=false spring.cloud.nacos.discovery.register-enabled=true

  9. 计算机和建筑学薪资待遇区别,工科中薪资待遇最高、女生最多、毕业后竞争最激烈的前两名专业!...

    现代社会工科是着重培养应用型人才,随着我国社会经济进入高质量的发展"高速路",对于高质量的工科人才需求正在稳步提升,待遇好.好就业是工科专业最大的优点所在.正因为此,工科类专业都受 ...

最新文章

  1. windows搭建gcc开发环境(msys2) objdump
  2. linux下卸载 dev sd*下硬盘,Linux下硬盘操作解析
  3. [云炬创业基础笔记]第十一章创业计划书测试14
  4. 最大化平均值 (二分搜索法)
  5. 【深度学习】何恺明经典之作—2009 CVPR Best Paper | Dark Channel Prior
  6. beandefinition与beanfactory
  7. Android之自定义属性
  8. linux上修改html,linux进程名修改
  9. leetcode 加一
  10. 特斯拉将国产Model 3后轮驱动版售价上调1.5万元
  11. qi接收启动协议_无线充电Qi通信协议分析
  12. quartz框架(五)-Trigger相关内容
  13. LeetCode-Hot100-最长回文子串
  14. 电子加速器原理与应用
  15. flea-jersey使用之Flea RESTful接口服务端接入
  16. 知物由学 | 一文读懂Android资源文件保护
  17. tpshop 阿里云短信sdk使用和带链接短信实现
  18. 饶天亮到访深圳时空梭,区块链技术与名人明星产业碰撞出新火花
  19. sqlserver存储过程报错:当前事务无法提交,而且无法支持写入日志文件的操作。请回滚该事务
  20. electron-updater自动更新踩坑

热门文章

  1. 【自然语言处理】 知识融入方法
  2. 新一代国产物联网LPWAN通信技术——TPUNB
  3. 大数据分析的众包平台—Kaggle
  4. 裸辞创业,挣了一千万!有钱人,都不想告诉你的5个秘密
  5. 绝对旋转编码器学习笔记(基本原理,与PC通信等,不定期更新中)
  6. 数据压缩 实验三 Huffman编解码算法实现与压缩效率分析
  7. Unity_塔防游戏(7)敌人炮塔之间的Collider碰撞优化
  8. CSS @规则(详细)
  9. 【AI芯片】2019年AI芯片产业深度研究报告
  10. java-net-php-python-ssm服装厂管理系统计算机毕业设计程序