【发布时间】:2016-02-08 20:53:46
【问题描述】:
我正在尝试使用嵌入式定位器服务在 gemfire 中集群服务器。
服务器 1
serverCache = new CacheFactory().set("cache-xml-file", "server-cache.xml")
.set("mcast-port", "0")
.set("start-locator", "11001")
.set("locators", "localhost[11001],10.0.0.193[11002]").create();
服务器 2
serverCache = new CacheFactory().set("cache-xml-file", "server-cache.xml")
.set("mcast-port", "0")
.set("start-locator", "11002")
.set("locators", "10.0.0.192[11001],localhost[11002]").create();
但他们无法连接
来自服务器 1
[警告 2016/02/08 20:37:41.510 UTC tid=0x28] 定位器发现任务无法与 ip-10-0-0-193.ec2.internal[ 交换定位器信息 localhost[11001] 11002] 55 次重试后。 10,000 毫秒后重试。
来自服务器 2
[警告 2016/02/08 20:46:27.867 UTC tid=0x28] 定位器发现任务无法与 ip-10-0-0-192.ec2.internal[ 交换定位器信息 localhost[11002] 11001] 102 次重试后。 10,000 毫秒后重试。
它关闭了,但我错过了一些东西
是的,使用 .set("bind-address", "10.0.0.193") 答案似乎可以解决问题。只是为了确认日志,我是否创建了一个集群
服务器1
[info 2016/02/09 09:39:07.445 UTC tid=0x3c] 成员资格:处理添加
[info 2016/02/09 09:39:07.445 UTC tid=0x3c] 接纳成员:14968>。现在有 2 个非管理员成员。
[info 2016/02/09 09:39:07.460 UTC tid=0x41] 成员 ip-10-0-0-192(14522):14968 不等效或不在同一冗余区域中。
[info 2016/02/09 09:39:12.923 UTC tid=0x28] 定位器发现任务交换定位器信息 ip-10-0-0-193.ec2.internal[11001] 与 ip-10-0-0 -192.ec2.internal[11001]: {-1=[ip-10-0-0-192.ec2.internal[11001], ip-10-0-0-193.ec2.internal[11001]]} .
[info 2016/02/09 09:39:13.245 UTC tid=0x46] 初始化区域 _gfe_non_durable_client_with_id_ip-10-0-0-186(3936:loner):49683:5b2966c5_2_queue
[info 2016/02/09 09:39:13.247 UTC tid=0x46] 区域初始化_gfe_non_durable_client_with_id_ip-10-0-0-186(3936:loner):49683:5b2966c5_2_queue 完成
[info 2016/02/09 09:39:13.252 UTC tid=0x46] 条目到期任务已禁用,因为队列已成为主队列。旧消息TimeToLive 是:180
[info 2016/02/09 09:39:13.435 UTC tid=0x46] 初始化区域 _gfe_non_durable_client_with_id_ip-10-0-0-189(4036:loner):51441:762a66c5_2_queue
[info 2016/02/09 09:39:13.437 UTC tid=0x46] 区域初始化 _gfe_non_durable_client_with_id_ip-10-0-0-189(4036:loner):51441:762a66c5_2_queue 完成
[info 2016/02/09 09:39:13.438 UTC tid=0x46] 条目到期任务已禁用,因为队列已成为主队列。旧消息TimeToLive 是:180
和服务器 2
[info 2016/02/09 09:39:07.245 UTC tid=0x1] 尝试使用会员 ID ip-10- 加入会员协调员为 ip-10-0-0-193(16745):57474 的分布式系统0-0-192(14522):14968
[info 2016/02/09 09:39:07.408 UTC tid=0x1] 成员资格:主要成员现在是 ip-10-0-0-193(16745):57474
[info 2016/02/09 09:39:07.412 UTC tid=0x23] GemFire 故障检测现在正在监控 ip-10-0-0-193(16745):57474
[info 2016/02/09 09:39:07.413 UTC tid=0x1] 以 ID ip-10-0-0-192(14522):14968 进入会员资格。
[info 2016/02/09 09:39:07.414 UTC tid=0x1] 正在启动 DistributionManager ip-10-0-0-192(14522):14968。 (耗时 272/毫秒)
[info 2016/02/09 09:39:07.414 UTC tid=0x1] 初始 (membershipManager) 视图 = [ip-10-0-0-193(16745):57474{lead}, ip-10-0 -0-192(14522):14968]
[info 2016/02/09 09:39:07.414 UTC tid=0x1] 接纳成员:57474>。现在有 1 个非管理员成员。
[info 2016/02/09 09:39:07.414 UTC tid=0x1] 接纳成员:14968>。现在有 2 个非管理员成员。
[info 2016/02/09 09:39:07.446 UTC:57474 shared unordered uid=1 port=39916> tid=0x28] 成员 ip-10-0-0-193(16745):57474 不等效或在同一个冗余区域中。
谢谢。
【问题讨论】:
标签: gemfire