2017-06-28 228 views
0

我正在构建使用静态IP发现而非多播IP发现(AWS EC2中的它)的Apache Ignite群集。Apache Ignite静态IP节点发现

我已经配置像这样(https://apacheignite.readme.io/docs/cluster-config#static-ip-based-discovery):

<property name="discoverySpi"> 
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> 
     <property name="ipFinder"> 
     <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> 
      <property name="addresses"> 
      <list> 
       <value>host1.example.com</value> 
       <value>host2.example.com</value> 
       <value>host3.example.com</value> 
      </list> 
      </property> 
     </bean> 
     </property> 
    </bean> 
    </property> 

当我启动的节点,我可以看到以下错误:

[15:04:36385] [警告] [主要] [TcpDiscoverySpi]无法连接到IP查找器的任何地址(请确保IP查找器地址正确,并且在所有主机上禁用了防火墙):[host1.example.com/10.0.21.223:47501,host2.example.com/10.0 .21.207:47501,host3.example.com/10.0.21.191:47501]

From我可以看到Ignite已将主机名正确解析为IP地址,但无法连接以形成群集。这些主机全部位于AWS EC2的同一子网中,并且我已验证端口47500在它们之间是开放的(我不确定47501参考是什么)。

我也试过只使用ip地址,而不是主机名,但结果是一样的。

我在这里错过了什么吗?

请注意,Ignite作为每个服务器上的Docker容器运行。 Ignite所需的TCP端口已暴露并且功能正常。

完整的日志:

[15:55:18,231][INFO][main][IgniteKernal] Config URL: file:/apache-ignite-fabric-1.6.0-bin/config/default-config.xml 
[15:55:18,231][INFO][main][IgniteKernal] Daemon mode: off 
[15:55:18,231][INFO][main][IgniteKernal] OS: Linux 4.4.19-29.55.amzn1.x86_64 amd64 
[15:55:18,231][INFO][main][IgniteKernal] OS user: root 
[15:55:18,231][INFO][main][IgniteKernal] Language runtime: Java Platform API Specification ver. 1.8 
[15:55:18,232][INFO][main][IgniteKernal] VM information: Java(TM) SE Runtime Environment 1.8.0_131-b11 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.131-b11 
[15:55:18,233][INFO][main][IgniteKernal] VM total memory: 3.0GB 
[15:55:18,233][INFO][main][IgniteKernal] Remote Management [restart: on, REST: on, JMX (remote: on, port: 49112, auth: off, ssl: off)] 
[15:55:18,233][INFO][main][IgniteKernal] IGNITE_HOME=/apache-ignite-fabric-1.6.0-bin 
[15:55:18,233][INFO][main][IgniteKernal] VM arguments: [-Xms1g, -Xmx1g, -XX:+AggressiveOpts, -XX:MaxMetaspaceSize=256m, -DIGNITE_QUIET=true, -DIGNITE_SUCCESS_FILE=/apache-ignite-fabric-1.6.0-bin/work/ignite_success_a8723f31-1954-4ea4-b190-762a36088140, -Dcom.sun.management.jmxremote, -Dcom.sun.management.jmxremote.port=49112, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.ssl=false, -DIGNITE_HOME=/apache-ignite-fabric-1.6.0-bin, -DIGNITE_PROG_NAME=/apache-ignite-fabric-1.6.0-bin/bin/ignite.sh, -Xmx3g, -XX:+UseG1GC] 
[15:55:18,234][INFO][main][IgniteKernal] Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache'] 
[15:55:18,234][WARNING][main][IgniteKernal] Peer class loading is enabled (disable it in production for performance and deployment consistency reasons) 
[15:55:18,238][INFO][main][IgniteKernal] 3-rd party licenses can be found at: /apache-ignite-fabric-1.6.0-bin/libs/licenses 
[15:55:18,284][INFO][main][IgniteKernal] Non-loopback local IPs: 172.17.0.2, fe80:0:0:0:42:acff:fe11:2%eth0 
[15:55:18,284][INFO][main][IgniteKernal] Enabled local MACs: 0242AC110002 
[15:55:18,294][INFO][main][IgnitePluginProcessor] Configured plugins: 
[15:55:18,295][INFO][main][IgnitePluginProcessor] ^-- None 
[15:55:18,295][INFO][main][IgnitePluginProcessor] 
[15:55:18,347][INFO][main][TcpCommunicationSpi] IPC shared memory server endpoint started [port=48100, tokDir=/apache-ignite-fabric-1.6.0-bin/work/ipc/shmem/cb41f1a5-d2f5-453d-a1c5-e008c1e12d2a-62] 
[15:55:18,348][INFO][main][TcpCommunicationSpi] Successfully bound shared memory communication to TCP port [port=48100, locHost=0.0.0.0/0.0.0.0] 
[15:55:18,362][INFO][main][TcpCommunicationSpi] Successfully bound to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0] 
[15:55:18,383][WARNING][main][NoopCheckpointSpi] Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation) 
[15:55:18,405][WARNING][main][GridCollisionManager] Collision resolution is disabled (all jobs will be activated upon arrival). 
[15:55:18,408][WARNING][main][NoopSwapSpaceSpi] Swap space is disabled. To enable use FileSwapSpaceSpi. 
[15:55:18,409][INFO][main][IgniteKernal] Security status [authentication=off, tls/ssl=off] 
[15:55:18,652][INFO][main][GridTcpRestProtocol] Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11211] 
[15:55:18,719][INFO][main][TcpDiscoverySpi] Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0] 
[15:55:21,746][WARNING][main][TcpDiscoverySpi] Failed to connect to any address from IP finder (make sure IP finder addresses are correct and firewalls are disabled on all host machines): [/10.0.21.191:47500, /10.0.21.207:47500, /10.0.21.223:47500] 
+0

提供完整的日志从节点,所以这将是可能找到的地址和端口的节点进行绑定。 –

+0

日志已被加载原时码 –

回答

0

默认端口为Ignite是47500,但在日志中,你可以看到它会尝试连接到47501:

尝试在您的地址列表来指定一个端口:

<value>host1.example.com:47500</value> 

此结果来自百度翻译,针对这个文档:https://apacheignite.readme.io/v2.0/docs/aws-deployment它可以用在你的情况。

+0

我已经试过了,它没有区别。我认为47501是指当地的港口。 AWS部署文档是指使用S3存储桶代替多播发现(组播在AWS EC2中被禁止),这不是我想要的。 –

+1

你能分享一个完整的点燃日志吗? – Michael

+0

日志已添加到原始帖子 –

0

首先,我会建议将Ignite从1.6更新到1.9。

二,指定端口,如建议here

使用--net = host运行docker,这样容器内的应用程序就会看到来自主机的网络接口。这应该有所帮助。

此外,它可以配置special S3 IpFinder