我想使用sentinel向尤里卡注册以发现pom.xml文件
4.0.0 org.springframework.boot spring-boot-starter-parent 2.0.3.RELEASE com.cyd.project spring-cloud-alibaba-demo 0.0.1-SNAPSHOT spring-cloud-alibaba-demo Demo project for Spring Boot 1.8 org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-web com.alibaba.cloud spring-cloud-starter-alibaba-sentinel org.springframework.boot spring-boot-starter-test test org.springframework.cloud spring-cloud-starter-netflix-eureka-client 2.0.1.RELEASE org.springframework.cloud spring-cloud-starter-netflix-ribbon 2.0.1.RELEASE org.springframework.boot spring-boot-starter-actuator com.alibaba.cloud spring-cloud-alibaba-dependencies 2.0.0.RELEASE pom import org.springframework.boot spring-boot-maven-plugin应用程序属性 spring.application.name=sentinel-example server.port=18084 spring.cloud.sentinel.transport.dashboard=localhost:8080 management.endpoint.health.show-details=always management.endpoints.web.exposure.include=* eureka.client.serviceUrl.defaultZone = http://eureka.xxx.cn/eureka/ eureka.client.healthcheck.enabled = true eureka.instance.lease-renewal-interval-in-seconds = 3 eureka.instance.lease-expiration-duration-in-seconds = 3 eureka.client.registerWithEureka = true eureka.client.fetchRegistry = true eureka.instance.prefer-ip-address = true eureka.instance.instance-id = ${spring.cloud.client.ip-address}:${server.port} #logging.level.org.springframework = DEBUG
控制台日志 2019-11-27 15:20:13.367 INFO 17824 --- [ main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1574839213367, current=UP, previous=STARTING] 2019-11-27 15:20:21.486 INFO 17824 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SENTINEL-EXAMPLE/172.16.56.152:18084: registering service... 2019-11-27 15:20:21.531 INFO 17824 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 18084 (http) with context path '' 2019-11-27 15:20:21.532 INFO 17824 --- [ main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 18084 2019-11-27 15:20:21.534 INFO 17824 --- [ main] .c.a.d.SpringCloudAlibabaDemoApplication : Started SpringCloudAlibabaDemoApplication in 14.244 seconds (JVM running for 14.897) 2019-11-27 15:20:21.576 INFO 17824 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SENTINEL-EXAMPLE/172.16.56.152:18084 - Re-registering apps/SENTINEL-EXAMPLE 2019-11-27 15:20:21.576 INFO 17824 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SENTINEL-EXAMPLE/172.16.56.152:18084: registering service... 2019-11-27 15:20:21.644 INFO 17824 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SENTINEL-EXAMPLE/172.16.56.152:18084 - registration status: 204 2019-11-27 15:20:21.644 INFO 17824 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SENTINEL-EXAMPLE/172.16.56.152:18084 - registration status: 204 INFO: log base dir is: C:\Users\l\logs\csp
INFO: log name use pid is: false 2019-11-27 15:20:27.553 WARN 17824 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1574839221675, current=DOWN, previous=UP]
可以看到尤里卡的注册状态已经从上到下变化,并且不会改变。除非我在服务中手动调整界面几次,否则他就会起床。 spring-cloud-alibaba 2.1.0.RELEASE也是这样的
原提问者GitHub用户p555iii
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。