-
1.9.2容器部署,直接从docker hub拉取的官方镜像,配了数据库的eureka address,环境变量自定义了三个数据库连接相关,configservice在eureka显示OUT_OF_SERVICE,adminservice注册正常为UP; 直接用服务器部署,config和admin均启动和注册正常为UP; 请教有没有知道是哪方面原因的,非常感谢。 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You may check the config service log for eureka related error messages. |
Beta Was this translation helpful? Give feedback.
-
在 config-service 容器中获取到如下的日志: bash-4.4# cat apollo-configservice.log
2022-03-22 19:05:26.381 INFO 1 --- [main] c.c.f.a.c.ConfigServiceApplication : Starting ConfigServiceApplication v1.9.2 using Java 1.8.0_212 on apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local with PID 1 (/apollo-configservice/apollo-configservice-1.9.2.jar started by root in /apollo-configservice)
2022-03-22 19:05:26.386 INFO 1 --- [main] c.c.f.a.c.ConfigServiceApplication : The following profiles are active: github
2022-03-22 19:05:29.471 INFO 1 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-03-22 19:05:29.965 INFO 1 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 472 ms. Found 17 JPA repository interfaces.
2022-03-22 19:05:30.728 INFO 1 --- [main] o.s.cloud.context.scope.GenericScope : BeanFactory id=9588ec42-3fa7-371d-97d4-b27e35a00a92
2022-03-22 19:05:31.311 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1806bc4c' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-03-22 19:05:31.324 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-03-22 19:05:31.839 INFO 1 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-03-22 19:05:31.858 INFO 1 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-03-22 19:05:31.858 INFO 1 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2022-03-22 19:05:31.935 INFO 1 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-03-22 19:05:31.936 INFO 1 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5464 ms
2022-03-22 19:05:32.402 INFO 1 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-03-22 19:05:32.673 INFO 1 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-03-22 19:05:32.816 INFO 1 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-03-22 19:05:32.969 INFO 1 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.27.Final
2022-03-22 19:05:33.404 INFO 1 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-03-22 19:05:33.699 INFO 1 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
2022-03-22 19:05:33.888 WARN 1 --- [main] org.hibernate.cfg.AnnotationBinder : HHH000503: A class should not be annotated with both @Inheritance and @MappedSuperclass. @Inheritance will be ignored for: com.ctrip.framework.apollo.common.entity.BaseEntity.
2022-03-22 19:05:36.007 INFO 1 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-03-22 19:05:36.082 INFO 1 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-03-22 19:05:37.366 INFO 1 --- [main] c.c.f.f.i.p.DefaultApplicationProvider : App ID is set to 100003171 by app.id property from /META-INF/app.properties
2022-03-22 19:05:37.378 INFO 1 --- [main] c.c.f.f.i.p.DefaultServerProvider : Environment is set to null. Because it is not available in either (1) JVM system property 'env', (2) OS env variable 'ENV' nor (3) property 'env' from the properties InputStream.
2022-03-22 19:05:37.385 INFO 1 --- [main] c.c.f.a.biz.service.BizDBPropertySource : Load config from DB : item.value.length.limit = 20000
2022-03-22 19:05:37.390 INFO 1 --- [main] c.c.f.a.biz.service.BizDBPropertySource : Load config from DB : item.key.length.limit = 128
2022-03-22 19:05:37.390 INFO 1 --- [main] c.c.f.a.biz.service.BizDBPropertySource : Load config from DB : eureka.service.url = http://localhost:8080/eureka/
2022-03-22 19:05:37.390 INFO 1 --- [main] c.c.f.a.biz.service.BizDBPropertySource : Load config from DB : namespace.lock.switch = false
2022-03-22 19:05:37.390 INFO 1 --- [main] c.c.f.a.biz.service.BizDBPropertySource : Load config from DB : config-service.cache.enabled = false
2022-03-22 19:05:39.439 INFO 1 --- [main] c.s.j.s.i.a.WebApplicationImpl : Initiating Jersey application, version 'Jersey: 1.19.4 05/24/2017 03:20 PM'
2022-03-22 19:05:39.618 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2022-03-22 19:05:39.622 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2022-03-22 19:05:39.911 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2022-03-22 19:05:39.915 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2022-03-22 19:05:42.053 WARN 1 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-03-22 19:05:42.291 INFO 1 --- [main] c.c.f.a.c.s.AppNamespaceServiceWithCache : Loaded 1 new app namespaces with startId 1
2022-03-22 19:05:42.307 INFO 1 --- [main] c.f.a.c.s.ReleaseMessageServiceWithCache : Loaded 1 release messages with startId 1
2022-03-22 19:05:42.724 INFO 1 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7789526e, org.springframework.security.web.context.SecurityContextPersistenceFilter@7207f3c2, org.springframework.security.web.header.HeaderWriterFilter@79a92277, org.springframework.security.web.authentication.logout.LogoutFilter@13cc3984, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@47bbf44d, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@57063e08, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@799557c8, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5fafd099, org.springframework.security.web.session.SessionManagementFilter@e98adb2, org.springframework.security.web.access.ExceptionTranslationFilter@224e7aa5]
2022-03-22 19:05:42.958 INFO 1 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2022-03-22 19:05:44.348 INFO 1 --- [main] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses Jersey
2022-03-22 19:05:44.559 WARN 1 --- [main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2022-03-22 19:05:44.608 INFO 1 --- [main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2022-03-22 19:05:44.729 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2022-03-22 19:05:44.733 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2022-03-22 19:05:44.744 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1647947144740 with initial instances count: 0
2022-03-22 19:05:44.792 INFO 1 --- [main] c.n.eureka.DefaultEurekaServerContext : Initializing ...
2022-03-22 19:05:44.799 INFO 1 --- [main] c.n.eureka.cluster.PeerEurekaNodes : Adding new peer nodes [http://localhost:8080/eureka/]
2022-03-22 19:05:45.211 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2022-03-22 19:05:45.211 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2022-03-22 19:05:45.216 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2022-03-22 19:05:45.216 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2022-03-22 19:05:45.403 INFO 1 --- [main] c.n.eureka.cluster.PeerEurekaNodes : Replica node URL: http://localhost:8080/eureka/
2022-03-22 19:05:45.477 INFO 1 --- [main] c.n.e.registry.AbstractInstanceRegistry : Finished initializing remote region registries. All known remote regions: []
2022-03-22 19:05:45.491 INFO 1 --- [main] c.n.eureka.DefaultEurekaServerContext : Initialized
2022-03-22 19:05:45.531 INFO 1 --- [main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 4 endpoint(s) beneath base path ''
2022-03-22 19:05:45.667 INFO 1 --- [main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application APOLLO-CONFIGSERVICE with eureka with status UP
2022-03-22 19:05:45.678 INFO 1 --- [Thread-9] o.s.c.n.e.server.EurekaServerBootstrap : Setting the eureka configuration..
2022-03-22 19:05:45.754 INFO 1 --- [Thread-9] o.s.c.n.e.server.EurekaServerBootstrap : isAws returned false
2022-03-22 19:05:45.755 INFO 1 --- [Thread-9] o.s.c.n.e.server.EurekaServerBootstrap : Initialized server context
2022-03-22 19:05:45.756 INFO 1 --- [Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2022-03-22 19:05:45.758 INFO 1 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-03-22 19:05:45.756 INFO 1 --- [Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2022-03-22 19:05:45.762 INFO 1 --- [Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP
2022-03-22 19:05:45.764 INFO 1 --- [main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8080
2022-03-22 19:05:45.788 INFO 1 --- [Thread-9] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2022-03-22 19:05:45.813 INFO 1 --- [main] c.c.f.a.c.ConfigServiceApplication : Started ConfigServiceApplication in 20.499 seconds (JVM running for 21.834)
2022-03-22 19:05:45.831 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2022-03-22 19:05:45.900 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
2022-03-22 19:05:45.906 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2022-03-22 19:05:45.938 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2022-03-22 19:05:45.938 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2022-03-22 19:05:45.938 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2022-03-22 19:05:45.938 INFO 1 --- [main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2022-03-22 19:05:46.055 INFO 1 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-03-22 19:05:46.055 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-03-22 19:05:46.058 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 3 ms
2022-03-22 19:05:46.083 INFO 1 --- [main] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2022-03-22 19:05:46.108 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Disable delta property : false
2022-03-22 19:05:46.108 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2022-03-22 19:05:46.108 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
2022-03-22 19:05:46.108 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Application is null : false
2022-03-22 19:05:46.113 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2022-03-22 19:05:46.114 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Application version is -1: true
2022-03-22 19:05:46.114 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2022-03-22 19:05:46.631 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : The response status is 200
2022-03-22 19:05:46.634 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 30
2022-03-22 19:05:46.638 INFO 1 --- [main] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4
2022-03-22 19:05:46.643 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1647947146643 with initial instances count: 0
2022-03-22 19:05:46.664 INFO 1 --- [main] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application APOLLO-CONFIGSERVICE with eureka with status DOWN
2022-03-22 19:05:46.664 INFO 1 --- [main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application APOLLO-CONFIGSERVICE with eureka with status UP
2022-03-22 19:05:46.665 INFO 1 --- [main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1647947146665, current=UP, previous=DOWN]
2022-03-22 19:05:46.692 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1647947146692, current=OUT_OF_SERVICE, previous=UP]
2022-03-22 19:05:46.692 WARN 1 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.discovery.InstanceInfoReplicator : Ignoring onDemand update due to rate limiter
2022-03-22 19:05:46.692 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080: registering service...
2022-03-22 19:05:46.873 INFO 1 --- [http-nio-8080-exec-3] c.n.e.registry.AbstractInstanceRegistry : Registered instance APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080 with status OUT_OF_SERVICE (replication=false)
2022-03-22 19:05:46.899 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080 - registration status: 204
2022-03-22 19:05:46.922 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1647947146922, current=UP, previous=OUT_OF_SERVICE]
2022-03-22 19:05:46.927 WARN 1 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.discovery.InstanceInfoReplicator : Ignoring onDemand update due to rate limiter
2022-03-22 19:05:46.927 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080: registering service...
2022-03-22 19:05:46.934 INFO 1 --- [http-nio-8080-exec-5] c.n.e.registry.AbstractInstanceRegistry : Registered instance APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080 with status OUT_OF_SERVICE (replication=false)
2022-03-22 19:05:46.939 INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080 - registration status: 204
2022-03-22 19:05:47.482 INFO 1 --- [http-nio-8080-exec-6] c.n.e.registry.AbstractInstanceRegistry : Registered instance APOLLO-CONFIGSERVICE/apollo-apollo-configservice-0.apollo-apollo-configservice.e58dcfb46d72493fbabd16dfaa7676d4.svc.cluster.local:apollo-configservice:8080 with status OUT_OF_SERVICE (replication=true)
2022-03-22 19:06:07.645 WARN 1 --- [http-nio-8080-exec-1] c.n.e.registry.AbstractInstanceRegistry : DS: Registry: lease doesn't exist, registering resource: APOLLO-ADMINSERVICE - apollo-apollo-adminservice-5cb495cdf4-7f7x6:apollo-adminservice:8090
2022-03-22 19:06:07.647 WARN 1 --- [http-nio-8080-exec-1] c.n.eureka.resources.InstanceResource : Not Found (Renew): APOLLO-ADMINSERVICE - apollo-apollo-adminservice-5cb495cdf4-7f7x6:apollo-adminservice:8090
2022-03-22 19:06:07.713 INFO 1 --- [http-nio-8080-exec-7] c.n.e.registry.AbstractInstanceRegistry : Registered instance APOLLO-ADMINSERVICE/apollo-apollo-adminservice-5cb495cdf4-7f7x6:apollo-adminservice:8090 with status UP (replication=false)
2022-03-22 19:06:08.229 INFO 1 --- [http-nio-8080-exec-8] c.n.e.registry.AbstractInstanceRegistry : Registered instance APOLLO-ADMINSERVICE/apollo-apollo-adminservice-5cb495cdf4-7f7x6:apollo-adminservice:8090 with status UP (replication=true)
2022-03-22 19:06:16.634 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Disable delta property : false
2022-03-22 19:06:16.638 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2022-03-22 19:06:16.638 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
2022-03-22 19:06:16.642 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Application is null : false
2022-03-22 19:06:16.642 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2022-03-22 19:06:16.642 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Application version is -1: false
2022-03-22 19:06:16.642 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2022-03-22 19:06:16.651 INFO 1 --- [DiscoveryClient-CacheRefreshExecutor-0] com.netflix.discovery.DiscoveryClient : The response status is 200
2022-03-22 19:06:45.764 INFO 1 --- [Eureka-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
2022-03-22 19:06:46.116 INFO 1 --- [AsyncResolver-bootstrap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 想摆脱解答下:
期待你的回复 @nobodyiam 😊 |
Beta Was this translation helpful? Give feedback.
-
通过在启动参数增加-Deureka.client.registerWithEureka=true -Deureka.client.fetch-registry=true 可以解决这个问题 |
Beta Was this translation helpful? Give feedback.
通过在启动参数增加-Deureka.client.registerWithEureka=true -Deureka.client.fetch-registry=true 可以解决这个问题