首页 > 解决方案 > 集群环境中的重复路由警告/错误

问题描述

我想在一个集群中有多个种子服务器,这样当单个种子服务器出现故障时,整个发现网络就不会超出范围,并且新服务器仍然能够启动。但是,控制台显示以下错误

[8180] 2020/08/05 11:16:27.071803 [[32mINF[0m] 127.0.0.1:50890 - rid:3 - 路由器连接关闭:重复路由 [8180] 2020/08/05 11:16:27.072794 [[ 32mINF[0m] 127.0.0.1:50891 - rid:4 - 路由器连接关闭:客户端关闭

我不确定该行是否表明存在问题,或者是否可以忽略。我的配置如下:

nats-server.exe -p 8081 --cluster nats://localhost:7071 // Independent Seed 1
nats-server.exe -p 8082 --cluster nats://localhost:7072 // Independent Seed 2
nats-server.exe -p 8083 --cluster nats://localhost:7073 // Independent Seed 3

nats-server.exe -p 9091 --cluster nats://localhost:9091 --routes nats://localhost:7071,nats://localhost:7072,nats://localhost:7073 // Node 1
nats-server.exe -p 9092 --cluster nats://localhost:9092 --routes nats://localhost:7071,nats://localhost:7072,nats://localhost:7073 // Node 1

如何避免重复路线?需要对配置进行任何更改(仍需要多个种子服务器)?

标签: nats.io

解决方案


推荐阅读