You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rag1998 <ra...@gmail.com> on 2018/02/09 04:55:25 UTC

Re: Connecting Amazon cluster with client from local

Reviving an old thread, since I am faced with a similar issue and am having
trouble getting my head wrapped around it..

We recently started experimenting with Ignite and have a 2 server cluster
setup on AWS with s3 based discovery, config for one of those servers looks
like below: (The addressResolver has the server's own private and public
address-55.55.555.1)
 
                <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="ignite"/>
                                        </bean>
                                </property>
                                 <property name="addressResolver">
                                     <bean
class="org.apache.ignite.configuration.BasicAddressResolver">
                                         <constructor-arg>
                                             <map>
                                                 <entry key="10.0.0.12"
value="55.55.555.1"/>
                                             </map>
                                         </constructor-arg>
                                   </bean>
                                 </property>
                        </bean>
                </property>

Config on the other server looks very similar, except for that servers own
private and public ip's-55.55.555.2

Both can talk to each other and the cluster comes up just fine, able to
Visor to connect to the cluster etc

Now to the problem, I am trying to connect a client from my local to the
cluster using Visor, this is the config on the local:

                                <property name="ipFinder">
                                        <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
                                                <property
name="awsCredentials" ref="aws.creds"/>
                                                <property name="bucketName"
value="ignite"/>
                                        </bean> 
                                </property>
								<property name="addressResolver">
                                     <bean
class="org.apache.ignite.configuration.BasicAddressResolver">
                                         <constructor-arg>
                                             <map>
						<entry key="10.0.0.11" value="55.55.555.1"/>
						<entry key="10.0.0.12" value="55.55.555.2"/>											 
                                                <entry key="10.10.10.120"
value="24.55.55.160"/> (local client's private and public IP)
                                             </map>
                                         </constructor-arg>
                                   </bean>
                                </property>

Port forwarding is also established on the client side, and telnet to server
ip's and ignite port, telnet to client's public ip and ignite port works
fine. 

Visor comes up and connects to the cluster fine, but when trying to do Top,
this is the error I am faced with:

class org.apache.ignite.IgniteCheckedException: Failed to send message (node
may have left the grid or TCP connection cannot be established due to
firewall issues) [node=TcpDiscoveryNode
[id=bcb110e3-55ff-4a5b-8d1b-d180485e1373, addrs=[0:0:0:0:0:0:0:1%lo,
10.0.0.11, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1%lo:47500,
/127.0.0.1:47500, /10.0.0.11:47500], discPort=47500, order=1, 

Which tells me that it is trying to talk to the Servers on their private
IP's and not their public IP's, which should have been resolved by
AddressResolver, what am I missing here?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Connecting Amazon cluster with client from local

Posted by vkulichenko <va...@gmail.com>.
Looks like you provided AddressResolver on TcpDiscoverySpi, so communication
SPI is not aware of it. Try setting it on IgniteConfiguration instead, that
will make both components to pick it up.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/