【发布时间】:2019-05-12 10:40:52
【问题描述】:
我在连接到 Ignite 集群时遇到问题。我在 AWS EC2 上有 2 个节点,我使用基于 AWS S3 的发现。 Ignites 节点启动时没有错误,我看到启动 Ignite 后新对象如何出现在 S3 存储桶中。 在 AWS 安全组中,我打开了所有 TCP 端口,以便任何人都可以连接到集群。
但是当我尝试从我的计算机连接时出现org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable 异常(我尝试从 IDE 运行简单的 JUnit 测试)。
我使用了以下配置:
<property name="addressResolver">
<bean class="org.apache.ignite.configuration.BasicAddressResolver">
<constructor-arg>
<map>
<entry key="EC2 internal IP" value="EC2 public ip"/>
</map>
</constructor-arg>
</bean>
</property>
<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="reference to another bean with aws creds"/>
<property name="bucketName" value="MY_BUCKET_NAME"/>
</bean>
</property>
</bean>
</property>
这里的问题是服务器拒绝任何连接尝试,因为当我启动 Ignite 客户端(不是瘦客户端)时,我在日志中看到以下图片:
如您所见,客户端的数量等于 0 然后 1、0 和 1 等等。 所以我想,客户端可以到达集群,但是为什么他们被拒绝了?
【问题讨论】:
标签: java amazon-web-services amazon-ec2 ignite