在 AWS 上构建 3 节点工作 Ignite 集群
Building 3 node working Ignite cluster on AWS
有没有人在 AWS 上成功启动三节点 ignite 集群而没有任何问题?如果可以,有人可以帮助您一步一步地解决如何解决问题。
Ignite 文档没有意义,它的信息很少且没有屏幕截图,文档仅解释了一个 Ec2 上的 docker 实例 运行 但我至少需要三节点 ignite 集群在 AWS 或 EMR 上。
我试过这个博客 (https://aws.amazon.com/blogs/big-data/real-time-in-memory-oltp-and-analytics-with-apache-ignite-on-aws/) and with the cloud formation json (https://github.com/aws-samples/aws-big-data-blog/blob/master/aws-blog-real-time-in-memory-oltp-and-analytics-with-apache-ignite/cloudformation/configignite.json),下面是云形成模板引用的 configureIgnite.sh 脚本,但 ignite 设置失败,默认有 属性 语法错误-config.xml 文件
#!/bin/bash
#
# This is a modified version of the file stored at s3://publicbucketbabupe/ignitelibrary/configureIgnite.sh
# which changes the config to use the instance provided credentials rather than requiring access/secret to be passed in
#
# Parameters are
# 1 - Cache Name
# 2 - Number of replicas
# 3 - S3 Bucket Name
#
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the \"License\"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an \"AS IS\" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns=\"http://www.springframework.org/schema/beans\"
xmlns:util=\"http://www.springframework.org/schema/util\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd\">
<!--
Alter configuration below as needed.
-->
<bean id=\"grid.cfg\" class=\"org.apache.ignite.configuration.IgniteConfiguration\">
<property name=\"cacheConfiguration\">
<list>
<bean class=\"org.apache.ignite.configuration.CacheConfiguration\">
<property name=\"name\" value=\"\"/>" > /tmp/igniteconfig.xml
echo " <property name=\"cacheMode\" value=\"PARTITIONED\"/>
<property name=\"atomicWriteOrderMode\" value=\"PRIMARY\"/>
<property name=\"writeSynchronizationMode\" value=\"PRIMARY_SYNC\"/>" >> /tmp/igniteconfig.xml
availfreeMemory=$(cat /proc/meminfo|grep MemTotal|awk '{print }')
memoryOverhead=$((availfreeMemory/1024/1024/10))
availfreeMemoryinGB=$((availfreeMemory/1024/1024 - memoryOverhead))
if [[ $availfreeMemoryinGB -gt 8 ]]; then
offheapmemoryinGB=$((availfreeMemoryinGB-8))
echo " <property name=\"memoryMode\" value=\"ONHEAP_TIERED\" />
<property name=\"offHeapMaxMemory\" value=\"#{$offheapmemoryinGB * 1024L * 1024L * 1024L}\" />" >> /tmp/igniteconfig.xml
echo "8g" > /tmp/heapsize.log
else
echo "${availfreeMemoryinGB}g" > /tmp/heapsize.log
fi
echo " <property name=\"evictionPolicy\">
<bean class=\"org.apache.ignite.cache.eviction.lru.LruEvictionPolicy\">
<property name=\"maxSize\" value=\"100000000\"/>
</bean>
</property>" >> /tmp/igniteconfig.xml
echo " <property name=\"swapEnabled\" value=\"false\"/>" >> /tmp/igniteconfig.xml
echo " <property name=\"atomicityMode\" value=\"ATOMIC\" />" >> /tmp/igniteconfig.xml
echo " <property name=\"backups\" value=\"\" />" >> /tmp/igniteconfig.xml
echo " </bean>" >> /tmp/igniteconfig.xml
echo " </list>" >> /tmp/igniteconfig.xml
echo "</property>" >> /tmp/igniteconfig.xml
echo "<property name=\"discoverySpi\">
<bean class=\"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi\">
<property name=\"ipFinder\">
<bean class=\"org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder\">
<property name=\"awsCredentials\" ref=\"aws.creds\"/>
<property name=\"bucketName\" value=\"\"/>
</bean>
</property>
</bean>
</property>
<property name=\"communicationSpi\">
<bean class=\"org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi\">
<property name=\"slowClientQueueLimit\" value=\"1000\"/>
</bean>
</property>
</bean>
<!-- AWS credentials. Provide your access key ID and secret access key. -->
<bean id="aws.creds" class="com.amazonaws.auth.BasicAWSCredentials">
<constructor-arg value="" />
<constructor-arg value="" />
</bean>
</beans>" >> /tmp/igniteconfig.xml
我还尝试了此博客 (https://www.gridgain.com/docs/8.7.6//installation-guide/manual-install-on-ec2) 中提到的以下步骤,但出现 Spring XML 错误。
我的 aws-static-ip-finder.xml 文件中的内容如下。
<bean class="org.apache.ignite.configuration.IgniteConfiguration" >
<!-- other properties -->
<!-- Explicitly configure TCP discovery SPI to provide a list of nodes. -->
<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>172.31.81.211</value>
<value>172.31.82.21</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1052)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:300)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:391)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:103)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:97)
at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:750)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:951)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:860)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:730)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:699)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 1 more
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:378)
... 9 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
... 12 more
Failed to start grid: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
谢谢
斯里
能否分享一下您为使集群形成工作所做的尝试?您使用的是哪个版本的 Ignite?
基本上,您必须在 Discovery SPI 中创建具有匹配 IP Finders 的 Ignite 配置,请查看此文档:
https://apacheignite-mix.readme.io/docs/amazon-aws
您还可以使用简单的静态 IP 查找器,其中包含 public 个 EC2 实例的 IP 地址:
https://apacheignite.readme.io/docs/tcpip-discovery#section-static-ip-finder
为此,打开列出的 EC2 实例,检查 "IPv4 Public IP" 字段。
您应该考虑的另一件事是安全组:
确保以下 TCP 端口双向打开(我已包括默认值):
发现:47500-47600(来自静态 IP 查找器的端口范围)
通讯:47100-47200
瘦客户端连接端口:10800
REST(可选):8080
确保这些连接也可通过出站访问,您必须可以接收来自其他 EC2 实例的消息。
这里是 GridGain 的详细文档:
https://www.gridgain.com/docs/latest/installation-guide/manual-install-on-ec2
只需将 GridGain 替换为 Ignite 即可完成部署。
有没有人在 AWS 上成功启动三节点 ignite 集群而没有任何问题?如果可以,有人可以帮助您一步一步地解决如何解决问题。
Ignite 文档没有意义,它的信息很少且没有屏幕截图,文档仅解释了一个 Ec2 上的 docker 实例 运行 但我至少需要三节点 ignite 集群在 AWS 或 EMR 上。
我试过这个博客 (https://aws.amazon.com/blogs/big-data/real-time-in-memory-oltp-and-analytics-with-apache-ignite-on-aws/) and with the cloud formation json (https://github.com/aws-samples/aws-big-data-blog/blob/master/aws-blog-real-time-in-memory-oltp-and-analytics-with-apache-ignite/cloudformation/configignite.json),下面是云形成模板引用的 configureIgnite.sh 脚本,但 ignite 设置失败,默认有 属性 语法错误-config.xml 文件
#!/bin/bash
#
# This is a modified version of the file stored at s3://publicbucketbabupe/ignitelibrary/configureIgnite.sh
# which changes the config to use the instance provided credentials rather than requiring access/secret to be passed in
#
# Parameters are
# 1 - Cache Name
# 2 - Number of replicas
# 3 - S3 Bucket Name
#
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the \"License\"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an \"AS IS\" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns=\"http://www.springframework.org/schema/beans\"
xmlns:util=\"http://www.springframework.org/schema/util\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd\">
<!--
Alter configuration below as needed.
-->
<bean id=\"grid.cfg\" class=\"org.apache.ignite.configuration.IgniteConfiguration\">
<property name=\"cacheConfiguration\">
<list>
<bean class=\"org.apache.ignite.configuration.CacheConfiguration\">
<property name=\"name\" value=\"\"/>" > /tmp/igniteconfig.xml
echo " <property name=\"cacheMode\" value=\"PARTITIONED\"/>
<property name=\"atomicWriteOrderMode\" value=\"PRIMARY\"/>
<property name=\"writeSynchronizationMode\" value=\"PRIMARY_SYNC\"/>" >> /tmp/igniteconfig.xml
availfreeMemory=$(cat /proc/meminfo|grep MemTotal|awk '{print }')
memoryOverhead=$((availfreeMemory/1024/1024/10))
availfreeMemoryinGB=$((availfreeMemory/1024/1024 - memoryOverhead))
if [[ $availfreeMemoryinGB -gt 8 ]]; then
offheapmemoryinGB=$((availfreeMemoryinGB-8))
echo " <property name=\"memoryMode\" value=\"ONHEAP_TIERED\" />
<property name=\"offHeapMaxMemory\" value=\"#{$offheapmemoryinGB * 1024L * 1024L * 1024L}\" />" >> /tmp/igniteconfig.xml
echo "8g" > /tmp/heapsize.log
else
echo "${availfreeMemoryinGB}g" > /tmp/heapsize.log
fi
echo " <property name=\"evictionPolicy\">
<bean class=\"org.apache.ignite.cache.eviction.lru.LruEvictionPolicy\">
<property name=\"maxSize\" value=\"100000000\"/>
</bean>
</property>" >> /tmp/igniteconfig.xml
echo " <property name=\"swapEnabled\" value=\"false\"/>" >> /tmp/igniteconfig.xml
echo " <property name=\"atomicityMode\" value=\"ATOMIC\" />" >> /tmp/igniteconfig.xml
echo " <property name=\"backups\" value=\"\" />" >> /tmp/igniteconfig.xml
echo " </bean>" >> /tmp/igniteconfig.xml
echo " </list>" >> /tmp/igniteconfig.xml
echo "</property>" >> /tmp/igniteconfig.xml
echo "<property name=\"discoverySpi\">
<bean class=\"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi\">
<property name=\"ipFinder\">
<bean class=\"org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder\">
<property name=\"awsCredentials\" ref=\"aws.creds\"/>
<property name=\"bucketName\" value=\"\"/>
</bean>
</property>
</bean>
</property>
<property name=\"communicationSpi\">
<bean class=\"org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi\">
<property name=\"slowClientQueueLimit\" value=\"1000\"/>
</bean>
</property>
</bean>
<!-- AWS credentials. Provide your access key ID and secret access key. -->
<bean id="aws.creds" class="com.amazonaws.auth.BasicAWSCredentials">
<constructor-arg value="" />
<constructor-arg value="" />
</bean>
</beans>" >> /tmp/igniteconfig.xml
我还尝试了此博客 (https://www.gridgain.com/docs/8.7.6//installation-guide/manual-install-on-ec2) 中提到的以下步骤,但出现 Spring XML 错误。
我的 aws-static-ip-finder.xml 文件中的内容如下。
<bean class="org.apache.ignite.configuration.IgniteConfiguration" >
<!-- other properties -->
<!-- Explicitly configure TCP discovery SPI to provide a list of nodes. -->
<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>172.31.81.211</value>
<value>172.31.82.21</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1052)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:300)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:391)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:103)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:97)
at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:750)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:951)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:860)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:730)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:699)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 1 more
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:378)
... 9 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
... 12 more
Failed to start grid: Failed to instantiate Spring XML application context [springUrl=file:/home/ec2-user/aws-static-ip-finder_2.xml, err=Line 1 in XML document from URL [file:/home/ec2-user/aws-static-ip-finder_2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 67; cvc-elt.1: Cannot find the declaration of element 'bean'.]
谢谢 斯里
能否分享一下您为使集群形成工作所做的尝试?您使用的是哪个版本的 Ignite?
基本上,您必须在 Discovery SPI 中创建具有匹配 IP Finders 的 Ignite 配置,请查看此文档:
https://apacheignite-mix.readme.io/docs/amazon-aws
您还可以使用简单的静态 IP 查找器,其中包含 public 个 EC2 实例的 IP 地址:
https://apacheignite.readme.io/docs/tcpip-discovery#section-static-ip-finder
为此,打开列出的 EC2 实例,检查 "IPv4 Public IP" 字段。
您应该考虑的另一件事是安全组:
确保以下 TCP 端口双向打开(我已包括默认值):
发现:47500-47600(来自静态 IP 查找器的端口范围)
通讯:47100-47200
瘦客户端连接端口:10800
REST(可选):8080
确保这些连接也可通过出站访问,您必须可以接收来自其他 EC2 实例的消息。
这里是 GridGain 的详细文档: https://www.gridgain.com/docs/latest/installation-guide/manual-install-on-ec2
只需将 GridGain 替换为 Ignite 即可完成部署。