启动EurekaClientServiceHiApplication时,报No active profile set, falling back to default profiles: default与Completed shut down of DiscoveryClient错误。具体报错信息如下所示:
2019-01-10 13:42:32.884 INFO 6904 --- [ main] c.t.e.e.EurekaClientServiceHiApplication : No active profile set, falling back to default profiles: default
2019-01-10 13:42:33.401 INFO 6904 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=c31f9bcc-b887-3fa7-b62b-6570deaaa885
2019-01-10 13:42:33.459 INFO 6904 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$9c972137] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-01-10 13:42:33.476 WARN 6904 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-01-10 13:42:33.476 INFO 6904 --- [ 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-01-10 13:42:33.481 WARN 6904 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-01-10 13:42:33.481 INFO 6904 --- [ 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-01-10 13:42:35.068 INFO 6904 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2019-01-10 13:42:35.111 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2019-01-10 13:42:35.659 INFO 6904 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2019-01-10 13:42:35.659 INFO 6904 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2019-01-10 13:42:35.781 INFO 6904 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2019-01-10 13:42:35.781 INFO 6904 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2019-01-10 13:42:36.011 INFO 6904 --- [ main] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Disable delta property : false
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Application is null : false
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Application version is -1: true
2019-01-10 13:42:36.281 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2019-01-10 13:42:36.449 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : The response status is 200
2019-01-10 13:42:36.452 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 30
2019-01-10 13:42:36.455 INFO 6904 --- [ main] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4
2019-01-10 13:42:36.461 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1547098956459 with initial instances count: 1
2019-01-10 13:42:36.462 INFO 6904 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application service-hi with eureka with status UP
2019-01-10 13:42:36.462 INFO 6904 --- [ main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1547098956462, current=UP, previous=STARTING]
2019-01-10 13:42:36.465 INFO 6904 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/xxxxx-PC:service-hi:8762: registering service...
2019-01-10 13:42:36.478 INFO 6904 --- [ main] c.t.e.e.EurekaClientServiceHiApplication : Started EurekaClientServiceHiApplication in 6.29 seconds (JVM running for 7.859)
2019-01-10 13:42:36.484 INFO 6904 --- [ Thread-18] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application service-hi with eureka with status DOWN
2019-01-10 13:42:36.484 WARN 6904 --- [ Thread-18] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1547098956484, current=DOWN, previous=UP]
2019-01-10 13:42:36.488 INFO 6904 --- [ Thread-18] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2019-01-10 13:42:36.520 INFO 6904 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/xxxxx-PC:service-hi:8762 - registration status: 204
2019-01-10 13:42:36.521 INFO 6904 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/xxxxx-PC:service-hi:8762: registering service...
2019-01-10 13:42:36.525 INFO 6904 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/xxxxx-PC:service-hi:8762 - registration status: 204
2019-01-10 13:42:36.547 INFO 6904 --- [ Thread-18] com.netflix.discovery.DiscoveryClient : Unregistering ...
2019-01-10 13:42:36.553 INFO 6904 --- [ Thread-18] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/xxxxx-PC:service-hi:8762 - deregister status: 200
2019-01-10 13:42:36.565 INFO 6904 --- [ Thread-18] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
Process finished with exit code 0
1、经排查研究后,在POM中添加如下依赖 ,可解决Completed shut down of DiscoveryClient
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
2、No active profile set, falling back to default profiles: default 这个错误可通过以下方式解决。