I am running a simple code to test Apache Ignite distributed cache. One node
is on a server and the other one is run locally when I start a java program.

public class HelloIgnite {
    public static void main(String[] args) {
        System.out.println("Hello Ignite");
        Ignite ignite = Ignition.start("example-cache.xml");
        // get or create cache
        IgniteCache<Integer, String> cache =
ignite.getOrCreateCache("testCache");
        // put some cache elements
        for(int i = 1; i <= 100; i++){
            cache.put(i, Integer.toString(i));
        }
        // get them from the cache and write to the console
        for(int i =1; i<= 100; i++){
            System.out.println("Cache get:"+ cache.get(i));
        }
        ignite.close();

    }
}


 The above is the simple code I am testing. And here is my ignite config

<beans xmlns="http://www.springframework.org/schema/beans";
       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";>
    <bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="peerClassLoadingEnabled" value="true"/>
        <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>127.0.0.1:47500..47509</value>
                                <value>SERVER_IP:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
                <property name="joinTimeout" value="1000"/>
            </bean>
        </property>
    </bean>
</beans>

I start node on the server using ignite.sh -p example-cache.xml first and
then run the above code locally. However, instead of putting values to the
cache and printing them, when I run the code, it is stuck showing this
message:

/ [13:40:46] Configured failure handler: [hnd=StopNodeOrHaltFailureHandler
[tryStop=false, timeout=0, super=AbstractFailureHandler
[ignoredFailureTypes=[SYSTEM_WORKER_BLOCKED,
SYSTEM_CRITICAL_OPERATION_TIMEOUT]]]]
[13:40:48] Message queue limit is set to 0 which may lead to potential OOMEs
when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to
message queues growth on sender and receiver sides.
[13:40:49] Security status [authentication=off, tls/ssl=off]/

On the node I started on the server, It is repeatedly printing the following
to the console:

/[11:48:28] Topology snapshot [ver=56, locNode=cd55466e, servers=2,
clients=0, state=ACTIVE, CPUs=40, offheap=28.0GB, heap=34.0GB]
[11:48:28] Topology snapshot [ver=57, locNode=cd55466e, servers=1,
clients=0, state=ACTIVE, CPUs=32, offheap=25.0GB, heap=30.0GB]
[11:48:34] Joining node doesn't have encryption data
[node=02e2f398-b5b8-4044-83dd-53755e28f94e]/

However, when I stop the server node, the local node starts to run properly
and print the values.

How can I resolve this? what I am doing wrong here?




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

Reply via email to