SpringCloud Eureka Client启动就停止报错

版权声明:本文为博主原创文章,未经博主允许不得转载。作者:转身、离开 https://blog.csdn.net/u010531369/article/details/80687902

Spring boot 版本为 2.0.2.RELEASE

Spring Cloud 版本为 Finchley.RC2

启动报错信息如下

2018-06-14 09:09:14.637  INFO 10436 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@48793bef: startup date [Thu Jun 14 09:09:14 CST 2018]; root of context hierarchy
2018-06-14 09:09:14.958  INFO 10436 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-06-14 09:09:15.023  INFO 10436 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6872207f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)


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


2018-06-14 09:09:15.776  INFO 10436 --- [           main] com.ligq.client.ClientApplication        : No active profile set, falling back to default profiles: default
2018-06-14 09:09:15.792  INFO 10436 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a551a63: startup date [Thu Jun 14 09:09:15 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@48793bef
2018-06-14 09:09:16.199  INFO 10436 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=c0d788a6-3698-3a44-a78c-18f4704863ee
2018-06-14 09:09:16.213  INFO 10436 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-06-14 09:09:16.275  INFO 10436 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6872207f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-06-14 09:09:16.314  WARN 10436 --- [           main] o.s.c.n.a.ArchaiusAutoConfiguration      : No spring.application.name found, defaulting to 'application'
2018-06-14 09:09:16.317  WARN 10436 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-06-14 09:09:16.317  INFO 10436 --- [           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.
2018-06-14 09:09:16.320  WARN 10436 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-06-14 09:09:16.321  INFO 10436 --- [           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.
2018-06-14 09:09:17.602  INFO 10436 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-06-14 09:09:17.612  INFO 10436 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2018-06-14 09:09:17.612  INFO 10436 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure
2018-06-14 09:09:17.613  INFO 10436 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure
2018-06-14 09:09:17.615  INFO 10436 --- [           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]
2018-06-14 09:09:17.627  INFO 10436 --- [           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]
2018-06-14 09:09:17.639  INFO 10436 --- [           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=2a551a63,type=ConfigurationPropertiesRebinder]
2018-06-14 09:09:17.648  INFO 10436 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2018-06-14 09:09:17.658  INFO 10436 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2018-06-14 09:09:17.703  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2018-06-14 09:09:18.216  INFO 10436 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2018-06-14 09:09:18.216  INFO 10436 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2018-06-14 09:09:18.338  INFO 10436 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2018-06-14 09:09:18.338  INFO 10436 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2018-06-14 09:09:18.580  INFO 10436 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2018-06-14 09:09:18.828  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2018-06-14 09:09:18.828  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2018-06-14 09:09:18.828  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2018-06-14 09:09:18.828  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2018-06-14 09:09:18.828  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2018-06-14 09:09:18.829  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2018-06-14 09:09:18.829  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2018-06-14 09:09:19.047  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2018-06-14 09:09:19.057  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2018-06-14 09:09:19.060  INFO 10436 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2018-06-14 09:09:19.068  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1528938559065 with initial instances count: 1
2018-06-14 09:09:19.075  INFO 10436 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application unknown with eureka with status UP
2018-06-14 09:09:19.075  INFO 10436 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1528938559075, current=UP, previous=STARTING]
2018-06-14 09:09:19.077  INFO 10436 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/DESKTOP-T39T2VU: registering service...
2018-06-14 09:09:19.095  INFO 10436 --- [           main] com.ligq.client.ClientApplication        : Started ClientApplication in 5.549 seconds (JVM running for 6.864)
2018-06-14 09:09:19.099  INFO 10436 --- [      Thread-16] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a551a63: startup date [Thu Jun 14 09:09:15 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@48793bef
2018-06-14 09:09:19.100  INFO 10436 --- [      Thread-16] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application unknown with eureka with status DOWN
2018-06-14 09:09:19.100  WARN 10436 --- [      Thread-16] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1528938559100, current=DOWN, previous=UP]
2018-06-14 09:09:19.101  INFO 10436 --- [      Thread-16] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2018-06-14 09:09:19.104  INFO 10436 --- [      Thread-16] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2018-06-14 09:09:19.139  INFO 10436 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/DESKTOP-T39T2VU - registration status: 204
2018-06-14 09:09:19.140  INFO 10436 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/DESKTOP-T39T2VU: registering service...
2018-06-14 09:09:19.148  INFO 10436 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/DESKTOP-T39T2VU - registration status: 204
2018-06-14 09:09:19.149  INFO 10436 --- [      Thread-16] com.netflix.discovery.DiscoveryClient    : Unregistering ...
2018-06-14 09:09:19.158  INFO 10436 --- [      Thread-16] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/DESKTOP-T39T2VU - deregister  status: 200
2018-06-14 09:09:19.167  INFO 10436 --- [      Thread-16] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient
2018-06-14 09:09:19.168  INFO 10436 --- [      Thread-16] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-06-14 09:09:19.168  INFO 10436 --- [      Thread-16] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
Disconnected from the target VM, address: '127.0.0.1:53512', transport: 'socket'


Process finished with exit code 0


项目启动后自动停止,在控制台没看到启动的端口,估计是没有引入spring boot的web包

在pom文件中引入如下

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

        </dependency>

重启解决问题。

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页