2017-05-31 61 views
0

我试图建立一个尤里卡集群组成的那里的服务器。 (我的设置是本地计算机上)春天尤里卡集群复制问题[版本eureka-Brixton.SR1]

配置为如下每个尤里卡服务器:

server1的:

server: 
    port: 8764 
eureka: 
    instance: 
    metadataMap: 
     instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} 
    client: 
    registerWithEureka: true 
    fetchRegistry: true 
    # availabilityZones: zone1,zone1,zone1 
    server: 
    waitTimeInMsWhenSyncEmpty: 0 
    serviceUrl: 
    defaultZone: http://localhost:8762/eureka/,http://localhost:8763/eureka/,http://localhost:8764/eureka/ 

服务器2:

server: 
    port: 8762 
eureka: 
    instance: 
    metadataMap: 
     instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} 
    client: 
    registerWithEureka: true 
    fetchRegistry: true 
    server: 
    waitTimeInMsWhenSyncEmpty: 0 
    serviceUrl: 
     defaultZone: http://localhost:8762/eureka/,http://localhost:8763/eureka/,http://localhost:8764/eureka/ 

server(服务器):

server: 
    port: 8763 

eureka: 
    instance: 
    metadataMap: 
     instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} 
    client: 
    registerWithEureka: true 
    fetchRegistry: true 
    server: 
    waitTimeInMsWhenSyncEmpty: 0 
    serviceUrl: 
     defaultZone: http://localhost:8762/eureka/,http://localhost:8763/eureka/,http://localhost:8764/eureka/ 
每个服务

r彼此对视,因此注册信息将在伺服器中复制。

但是,当我检查了日志服务器,它总是抛出异常的beblow:

enter image description here

我还检查了尤里卡服务器的仪表板,如下所示:

enter image description here

我不知道为什么注册的副本(http://localhost:8761/eureka/)没有改变,即使我配置了

serviceUrl: 
     defaultZone: http://localhost:8762/eureka/,http://localhost:8763/eureka/,http://localhost:8764/eureka/ 

我已经建立了科技服务,并注册到尤里卡集群,但不知何故只登记在eureak服务器的一个服务的信息,我希望这些信息也被复制到其他人也

有没有人遇到同样的问题,我一直在努力寻找很多东西,但找不到正确的答案。

高任何意见?

+0

你可以试试更新的东西吗? Dalston.SR1是最新的。 – spencergibb

+0

你能否告诉我在哪里可以得到bin分发的最新版本,因为我不想从源代码构建;我在公司网络中,因此有很多限制。 @spencergibb – Joey

+0

我们不提供打包下载。 Maven中心是所有二进制文件所在的地方。 – spencergibb

回答

0

我找到了问题。我已经把serviceUrl放在错误的部分(服务器)。

它应该在客户端部分。

server: 
    port: 8763 

eureka: 
    instance: 
    metadataMap: 
     instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}} 
    client: 
    registerWithEureka: false 
    fetchRegistry: false 
    serviceUrl: 
     defaultZone:  http://localhost:8762/eureka/,http://localhost:8763/eureka/,http://localhost:876 
    server: 
    waitTimeInMsWhenSyncEmpty: 0