首页 > 解决方案 > Apache Ignite.NET 持久化多节点

问题描述

我遇到了 Apache Ignite.NET 配置的问题。我想要实现的是启动多个配置了持久数据区域的节点。

我的代码:

var ignite = Ignition.Start(new IgniteConfiguration() { 

            DataStorageConfiguration = new DataStorageConfiguration()
            {
                DefaultDataRegionConfiguration = new DataRegionConfiguration()
                {
                    Name = "defaultRegion",
                    PersistenceEnabled = false
                },

                DataRegionConfigurations = new[]
                {
                    new DataRegionConfiguration
                    {
                        Name = "persistentRegion",
                        PersistenceEnabled = true
                    }
                }
            },
            CacheConfiguration = new[]
            {
                new CacheConfiguration
                {
                    Name = "persistentCache",
                    DataRegionName = "persistentRegion"
                }
            }
        });

当我在本地启动两个节点时——一个接一个,一切正常,cout 看起来像:

Topology snapshot [ver=2, locNode=524c9527, servers=2, clients=0, state=ACTIVE, CPUs=8, offheap=26.0GB, heap=14.0GB]

无论如何,当我尝试在本地网络中的另一台计算机上运行完全相同的 .exe(具有相同配置)时,第二个节点似乎正在等待某些东西,并且第一个节点重复消息:

Joining node doesn't have encryption data [node=8770f20c-...]

......它永远不会结束。

当我只从配置中删除持久数据区域时,一切都很好。我对 Apache Ignite 非常陌生,我将不胜感激。

我正在使用 Ignite 版本 2.7.6

标签: .netignite

解决方案


Joining node doesn't have encryption data并不表示连接问题,它只是告诉您未启用Ignite 数据加密- 在这种情况下无需担心。

实际问题似乎是其中一台机器(或两台机器)上的防火墙。请确保以下端口已打开:

  • 发现:47500~47600
  • 沟通:47100~47200

您可能还想打开其他东西(来自https://dzone.com/articles/a-simple-checklist-for-apache-ignite-beginners):

  • 瘦客户端:10800~10900
  • 休息API:8080

推荐阅读