ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From userx <gagan...@gmail.com>
Subject Re: ignite.active(true) blocking forever
Date Wed, 23 Aug 2017 18:12:02 GMT
Thanks Slava, 

The recommended configuration worked for me. But I believe there is a much
more seminal question here. If there is an error situation (OOM) why doesn't
the server shutdown itself because had I not changed the config you
recommended, I am not sure if the data grid server is even useful because
ths subsequent activations will fail as well.

In order to detect such failure events, I wrote the following code but no
failure event is being caught

The server code I am using is in ExampleNodeStartup
public class ExampleNodeStartup {
    /**
     * Start up an empty node with example compute configuration.
     *
     * @param args Command line arguments, none required.
     * @throws IgniteException If failed.
     */
    public static void main(String[] args) throws IgniteException {
                Ignite ignite = Ignition.start("config/example-ignite.xml");
        
        IgnitePredicate<Event> failureEvents = e -> {
        	return false;
        };
        ignite.events().localListen(failureEvents, EventType.EVTS_ERROR);
        Event event = ignite.events().waitForLocal(failureEvents,
EventType.EVTS_ERROR);
        if(event != null){
        	System.out.println("Event:"+event.name());
        	ignite.close();
        	Ignition.stop(true);
        }
        System.out.println("After");
    }
}

Here is the log

[23:38:49,330][SEVERE][exchange-worker-#34%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=3,
minorTopVer=1], nodeId=521eceaf, evt=DISCOVERY_CUSTOM_EVT]
java.lang.OutOfMemoryError
	at sun.misc.Unsafe.allocateMemory(Native Method)
	at
org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1054)
	at
org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:80)
	at
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.start(PageMemoryImpl.java:276)
	at
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.startMemoryPolicies(IgniteCacheDatabaseSharedManager.java:194)
	at
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.onActivate(IgniteCacheDatabaseSharedManager.java:949)
	at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.onActivate(GridCacheDatabaseSharedManager.java:459)
	at
org.apache.ignite.internal.processors.cache.GridCacheSharedContext.activate(GridCacheSharedContext.java:244)
	at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onClusterStateChangeRequest(GridDhtPartitionsExchangeFuture.java:762)
	at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:574)
	at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
	at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
	at java.lang.Thread.run(Thread.java:745)
[23:38:49,332][SEVERE][exchange-worker-#34%null%][GridCachePartitionExchangeManager]
Runtime error caught during grid runnable execution: GridWorker
[name=partition-exchanger, igniteInstanceName=null, finished=false,
hashCode=8631591, interrupted=false, runner=exchange-worker-#34%null%]
java.lang.OutOfMemoryError


How can I ensure listening to an event that if it is a failure event, the
server instance is stopped and it is no more a part of topology ?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-active-true-blocking-forever-tp16346p16383.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message