SpringCloud Eureka Cleint 启动就关闭

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringCloud Eureka Cleint 启动就关闭相关的知识,希望对你有一定的参考价值。

    SpringCloud Eureka 客户端一启动就关闭,检查服务器端已经启动,并且访问http://localhost:8671/
客户端控制台启动日志如下:

"D:Program FilesJavajdk1.8.0_191injava.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=50012 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:Program FilesJetBrainsIntelliJ IDEA 2018.3libidea_rt.jar=50013:D:Program FilesJetBrainsIntelliJ IDEA 2018.3in" -Dfile.encoding=UTF-8 -classpath "D:Program FilesJavajdk1.8.0_191jrelibcharsets.jar;D:Program FilesJavajdk1.8.0_191jrelibdeploy.jar;D:Program FilesJavajdk1.8.0_191jrelibextaccess-bridge-64.jar;D:Program FilesJavajdk1.8.0_191jrelibextcldrdata.jar;D:Program FilesJavajdk1.8.0_191jrelibextdnsns.jar;D:Program FilesJavajdk1.8.0_191jrelibextjaccess.jar;D:Program FilesJavajdk1.8.0_191jrelibextjfxrt.jar;D:Program FilesJavajdk1.8.0_191jrelibextlocaledata.jar;D:Program FilesJavajdk1.8.0_191jrelibext
ashorn.jar;D:Program FilesJavajdk1.8.0_191jrelibextsunec.jar;D:Program FilesJavajdk1.8.0_191jrelibextsunjce_provider.jar;D:Program FilesJavajdk1.8.0_191jrelibextsunmscapi.jar;D:Program FilesJavajdk1.8.0_191jrelibextsunpkcs11.jar;D:Program FilesJavajdk1.8.0_191jrelibextzipfs.jar;D:Program FilesJavajdk1.8.0_191jrelibjavaws.jar;D:Program FilesJavajdk1.8.0_191jrelibjce.jar;D:Program FilesJavajdk1.8.0_191jrelibjfr.jar;D:Program FilesJavajdk1.8.0_191jrelibjfxswt.jar;D:Program FilesJavajdk1.8.0_191jrelibjsse.jar;D:Program FilesJavajdk1.8.0_191jrelibmanagement-agent.jar;D:Program FilesJavajdk1.8.0_191jrelibplugin.jar;D:Program FilesJavajdk1.8.0_191jrelib
esources.jar;D:Program FilesJavajdk1.8.0_191jrelib
t.jar;D:Devspring-cloud-codech2-1ch2-1-eureka-client	argetclasses;D:maven_repositoryorgspringframeworkcloudspring-cloud-starter-netflix-eureka-client2.0.0.RELEASEspring-cloud-starter-netflix-eureka-client-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-starter2.0.0.RELEASEspring-cloud-starter-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-context2.0.0.RELEASEspring-cloud-context-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworksecurityspring-security-crypto5.0.3.RELEASEspring-security-crypto-5.0.3.RELEASE.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-commons2.0.0.RELEASEspring-cloud-commons-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworksecurityspring-security-rsa1.0.5.RELEASEspring-security-rsa-1.0.5.RELEASE.jar;D:maven_repositoryorgouncycastlecpkix-jdk15on1.56cpkix-jdk15on-1.56.jar;D:maven_repositoryorgouncycastlecprov-jdk15on1.56cprov-jdk15on-1.56.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-netflix-core2.0.0.RELEASEspring-cloud-netflix-core-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkootspring-boot-starter-aop2.0.0.RELEASEspring-boot-starter-aop-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkspring-aop5.0.4.RELEASEspring-aop-5.0.4.RELEASE.jar;D:maven_repositoryorgaspectjaspectjweaver1.8.13aspectjweaver-1.8.13.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-netflix-eureka-client2.0.0.RELEASEspring-cloud-netflix-eureka-client-2.0.0.RELEASE.jar;D:maven_repositorycom
etflixeurekaeureka-client1.9.2eureka-client-1.9.2.jar;D:maven_repositoryorgcodehausjettisonjettison1.3.7jettison-1.3.7.jar;D:maven_repositorystaxstax-api1.0.1stax-api-1.0.1.jar;D:maven_repositorycom
etflix
etflix-commons
etflix-eventbus.3.0
etflix-eventbus-0.3.0.jar;D:maven_repositorycom
etflix
etflix-commons
etflix-infix.3.0
etflix-infix-0.3.0.jar;D:maven_repositorycommons-jxpathcommons-jxpath1.3commons-jxpath-1.3.jar;D:maven_repositoryjoda-timejoda-time2.9.9joda-time-2.9.9.jar;D:maven_repositoryorgantlrantlr-runtime3.4antlr-runtime-3.4.jar;D:maven_repositoryorgantlrstringtemplate3.2.1stringtemplate-3.2.1.jar;D:maven_repositoryantlrantlr2.7.7antlr-2.7.7.jar;D:maven_repositorycomgooglecodegsongson2.8.2gson-2.8.2.jar;D:maven_repositoryorgapachecommonscommons-math2.2commons-math-2.2.jar;D:maven_repositorycom
etflixarchaiusarchaius-core.7.6archaius-core-0.7.6.jar;D:maven_repositorycomgoogleguavaguava16.0guava-16.0.jar;D:maven_repositoryjavaxws
sjsr311-api1.1.1jsr311-api-1.1.1.jar;D:maven_repositorycom
etflixservoservo-core.12.21servo-core-0.12.21.jar;D:maven_repositorycomsunjerseyjersey-core1.19.1jersey-core-1.19.1.jar;D:maven_repositorycomsunjerseyjersey-client1.19.1jersey-client-1.19.1.jar;D:maven_repositorycomsunjerseycontribsjersey-apache-client41.19.1jersey-apache-client4-1.19.1.jar;D:maven_repositoryorgapachehttpcomponentshttpclient4.5.5httpclient-4.5.5.jar;D:maven_repositoryorgapachehttpcomponentshttpcore4.4.9httpcore-4.4.9.jar;D:maven_repositorycommons-codeccommons-codec1.11commons-codec-1.11.jar;D:maven_repositorycomgoogleinjectguice4.1.0guice-4.1.0.jar;D:maven_repositoryjavaxinjectjavax.inject1javax.inject-1.jar;D:maven_repositoryaopallianceaopalliance1.0aopalliance-1.0.jar;D:maven_repositorycomgithubvlsicompactmapcompactmap1.2.1compactmap-1.2.1.jar;D:maven_repositorycomgithubandrewomadexxdexx-collections.2dexx-collections-0.2.jar;D:maven_repositorycomfasterxmljacksoncorejackson-annotations2.9.0jackson-annotations-2.9.0.jar;D:maven_repositorycomfasterxmljacksoncorejackson-core2.9.4jackson-core-2.9.4.jar;D:maven_repositorycomfasterxmljacksoncorejackson-databind2.9.4jackson-databind-2.9.4.jar;D:maven_repositorycom
etflixeurekaeureka-core1.9.2eureka-core-1.9.2.jar;D:maven_repositoryorgcodehauswoodstoxwoodstox-core-asl4.4.1woodstox-core-asl-4.4.1.jar;D:maven_repositoryjavaxxmlstreamstax-api1.0-2stax-api-1.0-2.jar;D:maven_repositoryorgcodehauswoodstoxstax2-api3.1.4stax2-api-3.1.4.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-starter-netflix-archaius2.0.0.RELEASEspring-cloud-starter-netflix-archaius-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-netflix-ribbon2.0.0.RELEASEspring-cloud-netflix-ribbon-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-netflix-archaius2.0.0.RELEASEspring-cloud-netflix-archaius-2.0.0.RELEASE.jar;D:maven_repositorycommons-configurationcommons-configuration1.8commons-configuration-1.8.jar;D:maven_repositorycommons-langcommons-lang2.6commons-lang-2.6.jar;D:maven_repositoryorgspringframeworkcloudspring-cloud-starter-netflix-ribbon2.0.0.RELEASEspring-cloud-starter-netflix-ribbon-2.0.0.RELEASE.jar;D:maven_repositorycom
etflix
ibbon
ibbon2.2.5
ibbon-2.2.5.jar;D:maven_repositorycom
etflix
ibbon
ibbon-transport2.2.5
ibbon-transport-2.2.5.jar;D:maven_repositoryio
eactivex
xnetty-contexts.4.9
xnetty-contexts-0.4.9.jar;D:maven_repositoryio
eactivex
xnetty-servo.4.9
xnetty-servo-0.4.9.jar;D:maven_repositorycom
etflixhystrixhystrix-core1.5.12hystrix-core-1.5.12.jar;D:maven_repositoryorghdrhistogramHdrHistogram2.1.9HdrHistogram-2.1.9.jar;D:maven_repositoryio
eactivex
xnetty.4.9
xnetty-0.4.9.jar;D:maven_repositoryio
etty
etty-codec-http4.1.22.Final
etty-codec-http-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-codec4.1.22.Final
etty-codec-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-transport-native-epoll4.1.22.Final
etty-transport-native-epoll-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-common4.1.22.Final
etty-common-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-buffer4.1.22.Final
etty-buffer-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-transport-native-unix-common4.1.22.Final
etty-transport-native-unix-common-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-transport4.1.22.Final
etty-transport-4.1.22.Final.jar;D:maven_repositoryio
etty
etty-resolver4.1.22.Final
etty-resolver-4.1.22.Final.jar;D:maven_repositorycom
etflix
ibbon
ibbon-core2.2.5
ibbon-core-2.2.5.jar;D:maven_repositorycom
etflix
ibbon
ibbon-httpclient2.2.5
ibbon-httpclient-2.2.5.jar;D:maven_repositorycommons-collectionscommons-collections3.2.2commons-collections-3.2.2.jar;D:maven_repositorycom
etflix
etflix-commons
etflix-commons-util.3.0
etflix-commons-util-0.3.0.jar;D:maven_repositorycom
etflix
ibbon
ibbon-loadbalancer2.2.5
ibbon-loadbalancer-2.2.5.jar;D:maven_repositorycom
etflix
etflix-commons
etflix-statistics.1.1
etflix-statistics-0.1.1.jar;D:maven_repositoryio
eactivex
xjava1.3.6
xjava-1.3.6.jar;D:maven_repositorycom
etflix
ibbon
ibbon-eureka2.2.5
ibbon-eureka-2.2.5.jar;D:maven_repositoryorgslf4jslf4j-api1.7.25slf4j-api-1.7.25.jar;D:maven_repositorycom	houghtworksxstreamxstream1.4.10xstream-1.4.10.jar;D:maven_repositoryxmlpullxmlpull1.1.3.1xmlpull-1.1.3.1.jar;D:maven_repositoryxpp3xpp3_min1.1.4cxpp3_min-1.1.4c.jar;D:maven_repositoryorgspringframeworkootspring-boot-starter2.0.0.RELEASEspring-boot-starter-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkootspring-boot2.0.0.RELEASEspring-boot-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkspring-context5.0.4.RELEASEspring-context-5.0.4.RELEASE.jar;D:maven_repositoryorgspringframeworkspring-beans5.0.4.RELEASEspring-beans-5.0.4.RELEASE.jar;D:maven_repositoryorgspringframeworkspring-expression5.0.4.RELEASEspring-expression-5.0.4.RELEASE.jar;D:maven_repositoryorgspringframeworkootspring-boot-autoconfigure2.0.0.RELEASEspring-boot-autoconfigure-2.0.0.RELEASE.jar;D:maven_repositoryorgspringframeworkootspring-boot-starter-logging2.0.0.RELEASEspring-boot-starter-logging-2.0.0.RELEASE.jar;D:maven_repositorychqoslogbacklogback-classic1.2.3logback-classic-1.2.3.jar;D:maven_repositorychqoslogbacklogback-core1.2.3logback-core-1.2.3.jar;D:maven_repositoryorgapachelogginglog4jlog4j-to-slf4j2.10.0log4j-to-slf4j-2.10.0.jar;D:maven_repositoryorgapachelogginglog4jlog4j-api2.10.0log4j-api-2.10.0.jar;D:maven_repositoryorgslf4jjul-to-slf4j1.7.25jul-to-slf4j-1.7.25.jar;D:maven_repositoryjavaxannotationjavax.annotation-api1.3.2javax.annotation-api-1.3.2.jar;D:maven_repositoryorgspringframeworkspring-core5.0.4.RELEASEspring-core-5.0.4.RELEASE.jar;D:maven_repositoryorgspringframeworkspring-jcl5.0.4.RELEASEspring-jcl-5.0.4.RELEASE.jar;D:maven_repositoryorgyamlsnakeyaml1.19snakeyaml-1.19.jar" com.springcloud.book.Ch21EurekaClientApplication
2019-03-04 09:33:52.565  INFO 15252 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]55b7a4e0: startup date [Mon Mar 04 09:33:52 GMT+08:00 2019]; root of context hierarchy
2019-03-04 09:33:52.693  INFO 15252 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 ‘javax.inject.Inject‘ annotation found and supported for autowiring
2019-03-04 09:33:52.714  INFO 15252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean ‘configurationPropertiesRebinderAutoConfiguration‘ of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1b7bd026] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\ / ___‘_ __ _ _(_)_ __  __ _    ( ( )\___ | ‘_ | ‘_| | ‘_ / _` |     \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  ‘  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.0.RELEASE)

2019-03-04 09:33:53.148  INFO 15252 --- [           main] c.s.book.Ch21EurekaClientApplication     : The following profiles are active: demo
2019-03-04 09:33:53.156  INFO 15252 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]1115ec15: startup date [Mon Mar 04 09:33:53 GMT+08:00 2019]; parent: org.spring[email protected]55b7a4e0
2019-03-04 09:33:53.343  INFO 15252 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=511cd1a9-adea-3afe-be2c-77116b7bbf91
2019-03-04 09:33:53.349  INFO 15252 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 ‘javax.inject.Inject‘ annotation found and supported for autowiring
2019-03-04 09:33:53.386  INFO 15252 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration‘ of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1b7bd026] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-03-04 09:33:53.453  WARN 15252 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2019-03-04 09:33:53.453  INFO 15252 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-03-04 09:33:53.456  WARN 15252 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2019-03-04 09:33:53.456  INFO 15252 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-03-04 09:33:54.260  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-03-04 09:33:54.264  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name ‘refreshScope‘ has been autodetected for JMX exposure
2019-03-04 09:33:54.265  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name ‘configurationPropertiesRebinder‘ has been autodetected for JMX exposure
2019-03-04 09:33:54.265  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name ‘environmentManager‘ has been autodetected for JMX exposure
2019-03-04 09:33:54.266  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean ‘environmentManager‘: registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2019-03-04 09:33:54.274  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean ‘refreshScope‘: registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2019-03-04 09:33:54.279  INFO 15252 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean ‘configurationPropertiesRebinder‘: registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1115ec15,type=ConfigurationPropertiesRebinder]
2019-03-04 09:33:54.284  INFO 15252 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2019-03-04 09:33:54.289  INFO 15252 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2019-03-04 09:33:54.313  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2019-03-04 09:33:54.684  INFO 15252 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2019-03-04 09:33:54.684  INFO 15252 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2019-03-04 09:33:54.755  INFO 15252 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2019-03-04 09:33:54.755  INFO 15252 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2019-03-04 09:33:54.866  INFO 15252 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2019-03-04 09:33:55.075  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2019-03-04 09:33:55.143  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2019-03-04 09:33:55.144  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2019-03-04 09:33:55.145  INFO 15252 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2019-03-04 09:33:55.148  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1551663235147 with initial instances count: 0
2019-03-04 09:33:55.150  INFO 15252 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application demo-client1 with eureka with status UP
2019-03-04 09:33:55.151  INFO 15252 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1551663235151, current=UP, previous=STARTING]
2019-03-04 09:33:55.151  INFO 15252 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_DEMO-CLIENT1/LAPTOP-KPHD2DV0:demo-client1:8081: registering service...
2019-03-04 09:33:55.157  INFO 15252 --- [           main] c.s.book.Ch21EurekaClientApplication     : Started Ch21EurekaClientApplication in 3.223 seconds (JVM running for 3.946)
2019-03-04 09:33:55.159  INFO 15252 --- [      Thread-11] s.c.a.AnnotationConfigApplicationContext : Closing org.spring[email protected]1115ec15: startup date [Mon Mar 04 09:33:53 GMT+08:00 2019]; parent: org.spring[email protected]55b7a4e0
2019-03-04 09:33:55.159  INFO 15252 --- [      Thread-11] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application demo-client1 with eureka with status DOWN
2019-03-04 09:33:55.159  WARN 15252 --- [      Thread-11] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1551663235159, current=DOWN, previous=UP]
2019-03-04 09:33:55.160  INFO 15252 --- [      Thread-11] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2019-03-04 09:33:55.160  INFO 15252 --- [      Thread-11] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2019-03-04 09:33:55.201  INFO 15252 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_DEMO-CLIENT1/LAPTOP-KPHD2DV0:demo-client1:8081 - registration status: 204
2019-03-04 09:33:55.201  INFO 15252 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_DEMO-CLIENT1/LAPTOP-KPHD2DV0:demo-client1:8081: registering service...
2019-03-04 09:33:55.216  INFO 15252 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_DEMO-CLIENT1/LAPTOP-KPHD2DV0:demo-client1:8081 - registration status: 204
2019-03-04 09:33:55.217  INFO 15252 --- [      Thread-11] com.netflix.discovery.DiscoveryClient    : Unregistering ...
2019-03-04 09:33:55.232  INFO 15252 --- [      Thread-11] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_DEMO-CLIENT1/LAPTOP-KPHD2DV0:demo-client1:8081 - deregister  status: 200
2019-03-04 09:33:55.238  INFO 15252 --- [      Thread-11] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient
2019-03-04 09:33:55.239  INFO 15252 --- [      Thread-11] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2019-03-04 09:33:55.239  INFO 15252 --- [      Thread-11] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans

Process finished with exit code 0

    一看日志,莫名其妙的,明明提示已经注册到服务中心,但是后面又被强制下线了。这种情况下,是因为没有加入依赖:

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

以上是关于SpringCloud Eureka Cleint 启动就关闭的主要内容,如果未能解决你的问题,请参考以下文章

springcloud费话之Eureka服务访问(restTemplate)

SpringCloud组件---Eureka

springcloud组件-eureka

SpringCloud之Eureka Feign简介

springCloud - Eureka

SpringCloud Eureka 注册中心