SpringCloud(十六)Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN

小咪咪 2022-05-20 07:46 212阅读 0赞

springboot版本:

  1. 2.0.1.RELEASE

springcloud版本:

  1. Finchley.RELEASE

日志:

  1. 2018-07-15 10:50:10.516 INFO 16952 --- [ main] c.x.springcloud.EurekaClientApplication : Started EurekaClientApplication in 8.884 seconds (JVM running for 10.459)
  2. 2018-07-15 10:50:10.522 INFO 16952 --- [ Thread-23] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4278284b: startup date [Sun Jul 15 10:50:05 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6c80d78a
  3. 2018-07-15 10:50:10.522 INFO 16952 --- [ Thread-23] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application eureka-client1 with eureka with status DOWN
  4. 2018-07-15 10:50:10.523 WARN 16952 --- [ Thread-23] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1531623010523, current=DOWN, previous=UP]
  5. 2018-07-15 10:50:10.524 INFO 16952 --- [ Thread-23] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0
  6. 2018-07-15 10:50:10.526 INFO 16952 --- [ Thread-23] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
  7. 2018-07-15 10:50:10.542 INFO 16952 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_EUREKA-CLIENT1/localhost:eureka-client1:8080 - registration status: 204
  8. 2018-07-15 10:50:10.543 INFO 16952 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_EUREKA-CLIENT1/localhost:eureka-client1:8080: registering service...
  9. 2018-07-15 10:50:10.547 INFO 16952 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_EUREKA-CLIENT1/localhost:eureka-client1:8080 - registration status: 204
  10. 2018-07-15 10:50:10.548 INFO 16952 --- [ Thread-23] com.netflix.discovery.DiscoveryClient : Unregistering ...
  11. 2018-07-15 10:50:10.553 INFO 16952 --- [ Thread-23] com.netflix.discovery.DiscoveryClient : DiscoveryClient_EUREKA-CLIENT1/localhost:eureka-client1:8080 - deregister status: 200
  12. 2018-07-15 10:50:10.564 INFO 16952 --- [ Thread-23] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
  13. 2018-07-15 10:50:10.565 INFO 16952 --- [ Thread-23] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
  14. 2018-07-15 10:50:10.565 INFO 16952 --- [ Thread-23] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
  15. Process finished with exit code 0

在eureka-client中加入web包后解决

  1. <dependency>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-web</artifactId>
  4. </dependency>

我理解的是不用web包只是一个java程序,所以运行后就停止了。具体原理,希望大家研究出来回复一下。

微信公众号与博客同时更新,敬请关注:

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTIzMjY0NjI_size_16_color_FFFFFF_t_70

发表评论

表情:
评论列表 (有 0 条评论,212人围观)

还没有评论,来说两句吧...

相关阅读