gpt4 book ai didi

Spring boot (Netflix) Eureka 副本

转载 作者:行者123 更新时间:2023-12-05 07:09:38 26 4
gpt4 key购买 nike

我无法使用副本配置 Eureka。我在同一台笔记本电脑上运行了两个 Eureka Server 实例。它始终将彼此视为 unavailable-replica

Eureka 面板是这样说的: Eureka message

这些是 application.yml 文件:

------------------------------
server:
port: 8761

eureka:
instance:
hostname: eurekaserver1
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://localhost:8762/eureka

--------------------------------

server:
port: 8762

eureka:
instance:
hostname: eurekaserver2
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://localhost:8761/eureka

--------------------------------

最佳答案

您需要有不同的主机名和相同的应用程序名称 (appname)。这是关于 Eureka's peer awareness. 的详细指南

关于Spring boot (Netflix) Eureka 副本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61490133/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com