gpt4 book ai didi

hazelcast - 为什么 Hazelcast 尝试连接到另外两个端口

转载 作者:行者123 更新时间:2023-12-02 01:24:26 25 4
gpt4 key购买 nike

我使用 IP 127.0.0.1 和端口 5701 启动 Hazelcast。为什么它尝试连接另外两个端口 5702 和 5703?它们的用途是什么,为什么无法连接?

以下是我以编程方式配置的方式:

Config config = new Config();        
NetworkConfig network = config.getNetworkConfig();
network.setPort(5701);
JoinConfig join = network.getJoin();
join.getMulticastConfig().setEnabled(false);
join.getTcpIpConfig().setEnabled(true);
join.getTcpIpConfig().addMember("127.0.0.1");

以下是开始hazelcast 时的日志。
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Creating TcpIpJoiner

Jun 22, 2016 11:58:41 AM com.hazelcast.core.LifecycleService
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Address[127.0.0.1]:5701 is STARTING

Jun 22, 2016 11:58:41 AM com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThreadingModel
INFO: [127.0.0.1]:5701 [dev] [3.6.3] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads

Jun 22, 2016 11:58:41 AM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Connecting to /127.0.0.1:5702, timeout: 0, bind-any: true

Jun 22, 2016 11:58:41 AM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Connecting to /127.0.0.1:5703, timeout: 0, bind-any: true

Jun 22, 2016 11:58:41 AM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Could not connect to: /127.0.0.1:5702. Reason: SocketException[Connection refused to address /127.0.0.1:5702]

Jun 22, 2016 11:58:41 AM com.hazelcast.nio.tcp.InitConnectionTask
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Could not connect to: /127.0.0.1:5703. Reason: SocketException[Connection refused to address /127.0.0.1:5703]

Jun 22, 2016 11:58:41 AM com.hazelcast.cluster.impl.TcpIpJoiner
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Address[127.0.0.1]:5702 is added to the blacklist.

Jun 22, 2016 11:58:41 AM com.hazelcast.cluster.impl.TcpIpJoiner
INFO: [127.0.0.1]:5701 [dev] [3.6.3] Address[127.0.0.1]:5703 is added to the blacklist.

Jun 22, 2016 11:58:42 AM com.hazelcast.cluster.impl.TcpIpJoiner
INFO: [127.0.0.1]:5701 [dev] [3.6.3]

谢谢!

最佳答案

每当您启动 Hazelcast 成员时,它首先会尝试查看具有当前配置的任何其他集群成员是否已经可用。如果找到一个,它将加入它们以形成集群,否则它将仅以单个成员启动集群。
默认情况下,它会检查相邻端口,即在您的情况下为 5702、5703。

关于hazelcast - 为什么 Hazelcast 尝试连接到另外两个端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37958465/

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