Search code examples
c#.netignite

Apache Ignite .Net Client Server Connection


I am new to Apache Ignite .Net.I have created two separate web applications with Apache Ignite from Nuget. One application set as client using clientMode = true But I dont know how to connect this two application using ip, port etc. Please help me... Please note both applications are run on localhost. I have tried with this link

I haven't added any config details of Ignite in client web.config.

My web.config for server :

   <configuration>
  <configSections>
    <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
  </configSections>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
  <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"
                        localhost="127.0.0.1" peerAssemblyLoadingMode="CurrentAppDomain">
    <atomicConfiguration atomicSequenceReserveSize="10" />

    <discoverySpi type="TcpDiscoverySpi">
      <ipFinder type="TcpDiscoveryMulticastIpFinder">
        <endpoints>
          <string>127.0.0.1:47500..47502</string>
        </endpoints>
      </ipFinder>
    </discoverySpi>
  </igniteConfiguration>
</configuration>

My Server Code for start Ignite:

IIgnite ignite = Ignition.StartFromApplicationConfiguration();

Client application hangs at code :

Ignition.Start()

Solution

  • Ignite nodes will connect to each other with default configuration, you don't need to change anything.

    Either remove discoverySpi from configuration on both client and server, or make sure that configuration is the same.

    Also note that client node will hang if there are no server nodes.