1

2 개의 복제본을 실행하는 서비스가 있습니다. 하지만 eureka의 대시 보드에 3 UP 인스턴스가있는 서비스를 발견했습니다.왜 유레카는 마지막 갱신 시간이 이틀이 지났는데도 서비스가 여전히 'UP'이라고 생각합니다

아래에는 유레카의 서비스에 대한 세부 정보가 나와 있습니다. 문제가있는 인스턴스는 8d0c39f3ed9b : ocr-server : 8095이며 마지막 갱신 시간은 이틀 전입니다. 상태 및 상태 URL에 액세스 할 수 없습니다. 나는 유레카가 그것을 생각하는 이유를 궁금해!

<application> 
<name>OCR-SERVER</name> 
<instance> 
<instanceId>211a4634b45f:ocr-server:8095</instanceId> 
<hostName>211a4634b45f</hostName> 
<app>OCR-SERVER</app> 
<ipAddr>10.0.0.38</ipAddr> 
<status>UP</status> 
<overriddenstatus>UNKNOWN</overriddenstatus> 
<port enabled="true">8095</port> 
<securePort enabled="false">443</securePort> 
<countryId>1</countryId> 
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"> 
<name>MyOwn</name> 
</dataCenterInfo> 
<leaseInfo> 
<renewalIntervalInSecs>30</renewalIntervalInSecs> 
<durationInSecs>90</durationInSecs> 
<registrationTimestamp>1505589414444</registrationTimestamp> 
<lastRenewalTimestamp>1505833520772</lastRenewalTimestamp> 
<evictionTimestamp>0</evictionTimestamp> 
<serviceUpTimestamp>1505589414444</serviceUpTimestamp> 
</leaseInfo> 
<metadata class="java.util.Collections$EmptyMap"/> 
<homePageUrl>http://211a4634b45f:8095/</homePageUrl> 
<statusPageUrl>http://211a4634b45f:8096/manage/info</statusPageUrl> 
<healthCheckUrl>http://211a4634b45f:8096/manage/health</healthCheckUrl> 
<vipAddress>ocr-server</vipAddress> 
<secureVipAddress>ocr-server</secureVipAddress> 
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer> 
<lastUpdatedTimestamp>1505589414444</lastUpdatedTimestamp> 
<lastDirtyTimestamp>1505589412731</lastDirtyTimestamp> 
<actionType>ADDED</actionType> 
</instance> 
<instance> 
<instanceId>8d0c39f3ed9b:ocr-server:8095</instanceId> 
<hostName>8d0c39f3ed9b</hostName> 
<app>OCR-SERVER</app> 
<ipAddr>10.0.0.38</ipAddr> 
<status>UP</status> 
<overriddenstatus>UNKNOWN</overriddenstatus> 
<port enabled="true">8095</port> 
<securePort enabled="false">443</securePort> 
<countryId>1</countryId> 
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"> 
<name>MyOwn</name> 
</dataCenterInfo> 
<leaseInfo> 
<renewalIntervalInSecs>30</renewalIntervalInSecs> 
<durationInSecs>90</durationInSecs> 
<registrationTimestamp>1505589356797</registrationTimestamp> 
<lastRenewalTimestamp>1505589356797</lastRenewalTimestamp> 
<evictionTimestamp>0</evictionTimestamp> 
<serviceUpTimestamp>1505589356797</serviceUpTimestamp> 
</leaseInfo> 
<metadata class="java.util.Collections$EmptyMap"/> 
<homePageUrl>http://8d0c39f3ed9b:8095/</homePageUrl> 
<statusPageUrl>http://8d0c39f3ed9b:8096/manage/info</statusPageUrl> 
<healthCheckUrl>http://8d0c39f3ed9b:8096/manage/health</healthCheckUrl> 
<vipAddress>ocr-server</vipAddress> 
<secureVipAddress>ocr-server</secureVipAddress> 
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer> 
<lastUpdatedTimestamp>1505589356797</lastUpdatedTimestamp> 
<lastDirtyTimestamp>1505589356787</lastDirtyTimestamp> 
<actionType>ADDED</actionType> 
</instance> 
<instance> 
<instanceId>0c62739f5ca8:ocr-server:8095</instanceId> 
<hostName>0c62739f5ca8</hostName> 
<app>OCR-SERVER</app> 
<ipAddr>10.0.0.34</ipAddr> 
<status>UP</status> 
<overriddenstatus>UNKNOWN</overriddenstatus> 
<port enabled="true">8095</port> 
<securePort enabled="false">443</securePort> 
<countryId>1</countryId> 
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"> 
<name>MyOwn</name> 
</dataCenterInfo> 
<leaseInfo> 
<renewalIntervalInSecs>30</renewalIntervalInSecs> 
<durationInSecs>90</durationInSecs> 
<registrationTimestamp>1505589403150</registrationTimestamp> 
<lastRenewalTimestamp>1505833509700</lastRenewalTimestamp> 
<evictionTimestamp>0</evictionTimestamp> 
<serviceUpTimestamp>1505589403150</serviceUpTimestamp> 
</leaseInfo> 
<metadata class="java.util.Collections$EmptyMap"/> 
<homePageUrl>http://0c62739f5ca8:8095/</homePageUrl> 
<statusPageUrl>http://0c62739f5ca8:8096/manage/info</statusPageUrl> 
<healthCheckUrl>http://0c62739f5ca8:8096/manage/health</healthCheckUrl> 
<vipAddress>ocr-server</vipAddress> 
<secureVipAddress>ocr-server</secureVipAddress> 
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer> 
<lastUpdatedTimestamp>1505589403150</lastUpdatedTimestamp> 
<lastDirtyTimestamp>1505589400020</lastDirtyTimestamp> 
<actionType>ADDED</actionType> 
</instance> 
</application> 

유레카 클라이언트의 설정은 아래와 같이

eureka: 
    instance: 
    statusPageUrlPath: /info 
    healthCheckUrlPath: /health 
    preferIpAddress: false 
    client: 
    fetchRegistry: true 
    registryFetchIntervalSeconds: 5 
    healthcheck: 
     enabled: true 
    serviceUrl: 
     defaultZone: http://eureka-peer1:8761/eureka,http://eureka-peer2:8761/eureka 
유레카 서버의 구성은

,

eureka: 
    instance: 
    preferIpAddress: true 
    enableSelfPreservation: false 
    homePageUrl: http://${eureka.hostname}/ 
--- 
spring: 
    profiles: peer1 
eureka: 
    instance: 
    hostname: eureka-peer1 
    client: 
    serviceUrl: 
     defaultZone: http://eureka-peer2:${server.port}/eureka/ 

--- 
spring: 
    profiles: peer2 
eureka: 
    instance: 
    hostname: eureka-peer2 
    client: 
    serviceUrl: 
     defaultZone: http://eureka-peer1:${server.port}/eureka/ 

그리고 유레카 클라이언트와 서버가 모두 고정 표시기 떼에서 실행중인 보인다.

+0

enableSelfPreservation : false – spencergibb

+0

@spencergibb, 저는 이미 eureka 서버에서'enableSelfPreservation : false'를 설정했습니다. 이 옵션이 클라이언트 측에도 영향을 미친다는 것을 의미합니까? – Kane

답변

1

귀하의 서버가 아마도 자체 보존 모드에 들어갔 기 때문에 서버가 오래된 인스턴스를 볼 수 있습니다.

enableSelfPreservation: false 옵션이 있지만 오른쪽 섹션에 없으므로 eureka.server.enableSelfPreservation이어야하며 입력 한 내용이 eureka.instance.enableSelfPreservation이고 올바르지 않습니다.

+0

어리석은 실수를 지적 해 주셔서 감사합니다. – Kane