我正在尝试将客户端注册到spring-eureka-server,客户端在注册后立即注销

尤里卡服务器日志:


2018-05-13 16:02:47.290信息25557 --- [io-9091-exec-10]
c.n.e.registry.AbstractInstanceRegistry:已注册的实例
HELLO-CLIENT / 192.168.43.96:hello-client:8072,状态为UP
(replication = false)2018-05-13 16:02:47.438信息25557-
[nio-9091-exec-3] c.n.e.registry.AbstractInstanceRegistry:
注册实例HELLO-CLIENT / 192.168.43.96:hello-client:8072与
状态DOWN(replication = false)2018-05-13 16:02:47.457 INFO 25557
--- [nio-9091-exec-2] c.n.e.registry.AbstractInstanceRegistry:已取消实例HELLO-CLIENT / 192.168.43.96:hello-client:8072
(replication = false)2018-05-13 16:02:47.950信息25557-
[nio-9091-exec-5] c.n.e.registry.AbstractInstanceRegistry:
注册实例HELLO-CLIENT / 192.168.43.96:hello-client:8072与
状态DOWN(replication = true)2018-05-13 16:02:47.951 INFO 25557 ---
[nio-9091-exec-5] c.n.e.registry.AbstractInstanceRegistry:已取消
实例HELLO-CLIENT / 192.168.43.96:hello-client:8072
(replication = true)2018-05-13 16:03:25.747信息25557-
[a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry:正在运行
带补偿时间的逐出任务4ms


Eureka客户端日志:


2018-05-13 16:02:47.163信息25676 --- [nfoReplicator-0]
com.netflix.discovery.DiscoveryClient:
DiscoveryClient_HELLO-CLIENT / 192.168.43.96:hello-client:8072:
正在注册服务... 2018-05-13 16:02:47.212 INFO 25676 --- [
main] c.a.helloclient.HelloClientApplication:已启动
HelloClientApplication在7.62秒内运行(JVM运行8.573)
2018-05-13 16:02:47.224信息25676 --- [Thread-5]
s.c.a.AnnotationConfigApplicationContext:关闭
org.springframework.context.annotation.AnnotationConfigApplicationContext@6f7923a5:
启用日期[IST 2018年5月13日16:02:42];父母:
org.springframework.context.annotation.AnnotationConfigApplicationContext@5c30a9b0
2018-05-13 16:02:47.226信息25676 --- [Thread-5]
o.s.c.n.e.s.EurekaServiceRegistry:取消注册应用程序
具有eureka的hello-client状态为DOWN 2018-05-13 16:02:47.227
WARN 25676 --- [Thread-5] com.netflix.discovery.DiscoveryClient
:看到本地状态更改事件StatusChangeEvent
[timestamp = 1526207567227,current = DOWN,Previous = UP] 2018-05-13
16:02:47.232 INFO 25676 --- [Thread-5]
o.s.c.support.DefaultLifecycleProcessor:在阶段0停止bean
2018-05-13 16:02:47.235 INFO 25676 --- [Thread-5]
com.netflix.discovery.DiscoveryClient:关闭
DiscoveryClient ... 2018-05-13 16:02:47.292信息25676-
[nfoReplicator-0] com.netflix.discovery.DiscoveryClient:
DiscoveryClient_HELLO-CLIENT / 192.168.43.96:hello-client:8072-
注册状态:204 2018-05-13 16:02:47.423 INFO 25676 ---
[nfoReplicator-0] com.netflix.discovery.DiscoveryClient:
DiscoveryClient_HELLO-CLIENT / 192.168.43.96:hello-client:8072:
正在注册服务... 2018-05-13 16:02:47.440 INFO 25676 ---
[nfoReplicator-0] com.netflix.discovery.DiscoveryClient:
DiscoveryClient_HELLO-CLIENT / 192.168.43.96:hello-client:8072-
注册状态:204 2018-05-13 16:02:47.442 INFO 25676 --- [
线程5] com.netflix.discovery.DiscoveryClient:正在注销...
2018-05-13 16:02:47.460 INFO 25676 --- [线程5]
com.netflix.discovery.DiscoveryClient:
DiscoveryClient_HELLO-CLIENT / 192.168.43.96:hello-client:8072-
注销状态:200 2018-05-13 16:02:47.494信息25676 --- [
线程5] com.netflix.discovery.DiscoveryClient:已关闭
的DiscoveryClient 2018-05-13 16:02:47.495 INFO 25676 --- [
线程5] o.s.j.e.a.AnnotationMBeanExporter:正在取消注册
关闭时JMX暴露的豆2018-05-13 16:02:47.498 INFO 25676 ---
[线程5] o.s.j.e.a.AnnotationMBeanExporter:
取消注册JMX暴露的bean


请让我知道可能出了什么问题。

最佳答案

看起来像一个依赖性问题。

如果该应用程序在没有eureka集成的情况下运行良好(核心功能),请尝试更改eureka-client依赖版本。

10-06 01:01