2017-06-28 55 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