Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN

报错如下:

DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001: registering service...
Started UserCenterApplication in 2.351 seconds (JVM running for 2.892)
Unregistering application USER-CENTER with eureka with status DOWN
Saw local status change event StatusChangeEvent [timestamp=1583640516889, current=DOWN, previous=UP]
Shutting down DiscoveryClient ...
DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001 - registration status: 204
DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001: registering service...
DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001 - registration status: 204
Unregistering ...
DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001 - deregister  status: 200
Completed shut down of DiscoveryClient

springboot版本:2.2.0.RELEASE

springcloud版本:Hoxton.RELEASE


解决:

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


    org.springframework.boot
    spring-boot-starter-web

可能原因:

1.不用web包只是一个java程序,所以运行后就停止了;

2.spring-boot-starter-web这个包里面存在tomcat,boot运行都需要这个包

以上猜测来自网络。

你可能感兴趣的:(Cloud,报错记录)