AWS Cluster

classic Classic list List threaded Threaded
2 messages Options
im281 im281
Reply | Threaded
Open this post in threaded view
|

AWS Cluster

I am having hard time connecting to a 2 node cluster on an AWS deployment. I
created two EC2 instances that I would like to
1) have discover each other
2) Connect via a .NET client

I have followed the following instructions to create EC2 instances

https://apacheignite.readme.io/docs/aws-deployment

Then used a simple example in .NET to simply connect

https://ptupitsyn.github.io/Getting-Started-With-Apache-Ignite-Net/


Any suggestions would be appreciated
best regards
im281

Here is a code snippet

 private static void InsertObjectToAWSCache()
        {
            Ignition.ClientMode = true;

            var cfg = new IgniteClientConfiguration
            {
                Host = "ec2 public DNS"

            };

            using (IIgniteClient client = Ignition.StartClient(cfg))
            {
                ICacheClient<int, string> cache = client.GetCache<int,
string>("cache");
                cache.Put(1, "Hello, World!");
            }

            Console.ReadKey();

        }






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
aealexsandrov aealexsandrov
Reply | Threaded
Open this post in threaded view
|

Re: AWS Cluster

Hello,

In case if your nodes don't see each other then try to check next:

1)That your IP finder configuration for every node contains the IP addresses
of every AWS node from the cluster like next:

       <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>178.0.0.1:47500..47501</value>
                                <value>178.0.0.2:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>

where 178.0.0.1 and 178.0.0.2 are AWS machines addresses.

2)Check you configurated the security group. It required because you should
open TCP ports for Ignite communication.

https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html

Example:

Inbound:

Custom TCP Rule TCP 10800 - 10900 0.0.0.0/0 client
Custom TCP Rule TCP 47500 - 47600 0.0.0.0/0 discovery
Custom TCP Rule TCP 47100 - 47200 0.0.0.0/0 communication

Outbound:

All traffic All All 0.0.0.0/0
All traffic All All ::/0

3)Check that ports is open in your operating system. For example, in
windows, you should add new rules to the firewall to open ports (or disable
the firewall)

When all steps above will be done and all IP addresses and ports will be
correct then your C# code will work as expected.

BR,
Andrei
 



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