为非AWS数据中心设置Eureka [英] Setting up Eureka for non-AWS datacenter

查看:243
本文介绍了为非AWS数据中心设置Eureka的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与2个对等方建立了Eureka,大约5分钟后,我看到此消息出现在UI中:

I have setup Eureka with 2 peers, after about 5 minutes I see this message appear in the UI:

紧急!如果不是,EUREKA可能会不正确地提出索赔要求.更新的门槛比以往任何时候都要小,因此,仅仅为了安全起见,实例就不会过期.

EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE.

当我查看一个正在运行的Eureka实例的输出时,我会看到:

When I look at the output from one of the running instances of Eureka, I see this:

2015-11-11 14:46:47.276  INFO 32748 --- [pool-5-thread-1] com.netflix.discovery.DiscoveryClient    : The response status is 200
2015-11-11 14:56:17.427  WARN 32748 --- [eerNodesUpdater] c.n.eureka.cluster.PeerEurekaNodes       : The replica size seems to be empty. Check the route 53 DNS Registry

如果我正确理解了这一点,Eureka认为它是在AWS上配置的.我无法在application.yml中找到任何内容来表明这一点.

If I'm understanding this correctly, Eureka thinks it is configured at AWS. I'm unable to find anything in the application.yml to indicate this.

关于我在配置中缺少什么的任何想法?

Any ideas on what I'm missing in the config?

server:
  port: 80

eureka:
  datacenter: boston
  instance:
    hostname: eureka03.domain.com
  client:
    serviceUrl:
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
---
eureka:
  instance:
    hostname: eureka01.domain.com
  client:
    serviceUrl:
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/

推荐答案

我发现我的application.yml存在问题,可以进行对等设置.如果有人遇到相同问题,这是正确的application.yml.

I found the issue with my application.yml to get peers setup. Here's the proper application.yml if anyone runs into the same issue.

peer1上的application.yml

application.yml on peer1

server:
  port: 80

eureka:
  datacenter: boston
  instance:
    hostname: eureka01
  client:
    serviceUrl:
      defaultZone: http://eureka03/eureka/

peer2上的application.yml

application.yml on peer2

server:
  port: 80

eureka:
  datacenter: boston
  instance:
    hostname: eureka03
  client:
    serviceUrl:
      defaultZone: http://eureka01/eureka/

这篇关于为非AWS数据中心设置Eureka的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆