Java Hazelcast 多集群问题

发布于 2024-11-08 11:48:20 字数 759 浏览 2 评论 0原文

我正在运行一个小型系统,该系统依赖于 Hazelcast 以多播模式进行集群、分布式计算和消息传递(下载中提供了标准配置)。我有许多作为“核心”Hazelcast 实例运行的服务器模块和一个作为 Hazelcast“本机客户端”实现的 Java Swing 应用程序。这一切都运行良好,我现在想在生产中调试系统,因此需要运行两个单独的集群(dev + prod),这就是我遇到问题的地方。

根据文档,您所需要做的就是为两者使用单独的组名称+密码集群,我的印象是这两个集群应该自动排序!?这似乎适用于服务器模块,但是当我尝试将“客户端”实例连接到产品环境时,我可以从产品中服务器模块之一的日志中看到客户端似乎已成功连接:

INFO: [prod] received auth from Connection [/192.168.0.2:55863 -> null] live=true,
client=true, type=JAVA_CLIENT, this group name:prod, auth group name:prod, 
successfully authenticated

但是,客户永远不会作为产品成员出现。相反,我发现客户端已成为开发环境的成员,即使身份验证是针对产品进行的!

两个集群的非自愿混合对于我和一个搅局者来说显然是一个巨大的问题。有谁知道我是否做错了什么,或者是否可以进行任何配置更改来解决问题?

I am running a small system that relies on Hazelcast for clustering, distributed computing and messaging in a Multicast mode (Standard config as available in the download). I have a number of server modules that run as "Core" Hazelcast instances and a Java Swing application that is implemented as a Hazelcast "Native Client". This all works well and I would now like to commission the system in production and would hence need to run two separate clusters (dev + prod) and that is where I run into problems.

According to the documentation all you need to is to use separate group names + passwords for the two clusters and I get the impression that the two clusters should sort themselves out automatically!? This appears to work for the server modules but when I try to connect a "Client"-instance to the prod environment, I can see from the logs of one of the server modules in prod that the client appears to connect successfully:

INFO: [prod] received auth from Connection [/192.168.0.2:55863 -> null] live=true,
client=true, type=JAVA_CLIENT, this group name:prod, auth group name:prod, 
successfully authenticated

But, the client never shows up as a member of prod. Instead, I find that the client has become a member of the dev environment even though the authentification took place against prod!

Involontary mixing of the two clusters is obviously a giant problem for me and a showstopper. Does anyone know if there is anything that I am doing wrong or if there are any configuration changes that I can do to resolve the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泛滥成性 2024-11-15 11:48:20

当客户端连接到集群时,它永远不会成为集群的成员。

所以我怀疑你的客户端确实连接到了产品,但不知何故在你的代码中你有类似 Hazelcat.getMap() 的东西,这会导致在该 JVM 中启动一个成员,因为该成员将使用的默认配置将与开发人员,这个新成员将加入您的开发集群。

因此,实际上您有一个连接到产品的客户端和连接到开发集群的另一个成员。

尝试通过客户端放置一些内容并查看这些条目出现在哪个集群中?

我说得有道理吗?

When a client connects to the cluster it never becomes a member of the cluster.

So I suspect that your client did connected to the prod, but somehow in your code you have somewhere something like Hazelcat.getMap() which results in starting a member in that JVM and since the default configuration that this member will use will be same as the dev, this new member will join to your dev cluster.

So in fact you have one client, that is connected to prod and another member that is connected to the dev cluster.

Try to put something through client and see in which cluster those entries are appear?

Am i making sense?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文