Hi, I asked this question at stackoverflow.

In my case, Spring Rest API embed ignite, that API is act as cache. There
are only Put/Get API, and they put to /get from Ignite caches.

My total Configuration like below(Java Code)

IgniteConfiguration config = new IgniteConfiguration();
    //discovery : multicast, I set consistentId manually for easily
Identifying me, actually I set named node1, node2, node3

    config.setRebalanceThreadPoolSize(3);
    config.setConsistentId(uniqueNodeId);

//3caches, Partitioned, 
config.setCacheConfiguration(
  new CacheConfiguration<K, V>()
        .setName(name1)
        .setBackups(1)
        .setCacheMode(PARTITIONED)
        .setWriteSynchronizationMode(PRIMARY_SYNC)
        .setCopyOnRead(false),
  new CacheConfiguration<K, V>()
        .setName(name2)
        .setBackups(1)
        .setCacheMode(PARTITIONED)
        .setWriteSynchronizationMode(PRIMARY_SYNC)
        .setCopyOnRead(false),
  new CacheConfiguration<K, V>()
        .setName(name3)
        .setBackups(1)
        .setCacheMode(PARTITIONED)
        .setWriteSynchronizationMode(PRIMARY_SYNC)
        .setCopyOnRead(false))

//pageSize : 4096, enable persistent, initRegionSize/maxRegionSize : 2G
config.setDataStorageConfiguration(new DataStorageConfiguration()
        .setPageSize(4096)
        .setMetricsEnabled(false)
        .setDataRegionConfigurations(new DataRegionConfiguration()
          .setPersistenceEnabled(true)
          .setName("myName")
          .setInitialSize(2147483648)
          .setMaxSize(2147483648)
          .setPageEvictionMode(DataPageEvictionMode.DISABLED)
          .setMetricsEnabled(false)));

//event listening, for monitoring
    int [] listenedEvent = {
      EventType.EVT_CACHE_NODES_LEFT,
      EventType.EVT_CACHE_OBJECT_PUT,
      EventType.EVT_CACHE_REBALANCE_STARTED,
      EventType.EVT_NODE_JOINED
    };
    
    config.setIncludeEventTypes(listenedEvent);
    
    config.setLocalEventListeners(new HashMap<IgnitePredicate&lt;? extends
Event>, int[]>() {{
      put(event -> {
        LOGGER.info("Event - time : {}, name : {}, type : {}, msg: {},
nodeId : {}", 
            LocalDateTime.ofInstant(Instant.ofEpochMilli(event.timestamp()),
ZoneId.systemDefault()), 
            event.name(), event.type(), event.message(), event.node().id());
        return true;
      }, listenedEvent);
    }});

then, when I started tomcat, below is my ignite log/I checked here,
persistentEnabled true and 3 nodes are all joined.

[18:17:19] (wrn) Failed to resolve IGNITE_HOME automatically for class
codebase [class=class o.a.i.i.util.IgniteUtils, e=URI is not hierarchical]
2018-04-23 18:17:19.086 ERROR 9519 --- [           main]                        
                 
: Failed to resolve default logging config file:
config/java.util.logging.properties
Console logging handler is not configured.
[18:17:19]    __________  ________________
[18:17:19]   /  _/ ___/ |/ /  _/_  __/ __/
[18:17:19]  _/ // (7 7    // /  / / / _/
[18:17:19] /___/\___/_/|_/___/ /_/ /___/
[18:17:19]
[18:17:19] ver. 2.4.0#20180305-sha1:aa342270
[18:17:19] 2018 Copyright(C) Apache Software Foundation
[18:17:19]
[18:17:19] Ignite documentation: http://ignite.apache.org
[18:17:19]
[18:17:19] Quiet mode.
[18:17:19]   ^-- Logging by 'JavaLogger [quiet=true, config=null]'
[18:17:19]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[18:17:19]
[18:17:19] OS: Linux 3.10.0-327.36.3.el7.x86_64 amd64
[18:17:19] VM information: Java(TM) SE Runtime Environment 1.8.0_171-b11
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.171-b11
[18:17:19] Configured plugins:
[18:17:19]   ^-- None
[18:17:19]
2018-04-23 18:17:19.923  WARN 9519 --- [           main]
o.a.i.s.c.tcp.TcpCommunicationSpi        : 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.
[18:17:19] 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.
2018-04-23 18:17:19.964  WARN 9519 --- [           main]
o.a.i.s.c.noop.NoopCheckpointSpi         : Checkpoints are disabled (to
enable configure any GridCheckpointSpi implementation)
2018-04-23 18:17:20.031  WARN 9519 --- [           main]
o.a.i.i.m.c.GridCollisionManager         : Collision resolution is disabled
(all jobs will be activated upon arrival).
[18:17:20] Security status [authentication=off, tls/ssl=off]
2018-04-23 18:17:21.046  WARN 9519 --- [           main]
.s.d.t.i.m.TcpDiscoveryMulticastIpFinder : TcpDiscoveryMulticastIpFinder has
no pre-configured addresses (it is recommended in production to specify at
least one address in TcpDiscoveryMulticastIpFinder.getAddresses()
configuration property)
2018-04-23 18:17:22.803  WARN 9519 --- [           main]
org.apache.ignite.internal.IgniteKernal  : Nodes started on local machine
require more than 20% of physical RAM what can lead to significant slowdown
due to swapping (please decrease JVM heap size, data region size or
checkpoint buffer size) [required=3506MB, available=1830MB]
[18:17:22] Nodes started on local machine require more than 20% of physical
RAM what can lead to significant slowdown due to swapping (please decrease
JVM heap size, data region size or checkpoint buffer size) [required=3506MB,
available=1830MB]
[18:17:22] Nodes started on local machine require more than 20% of physical
RAM what can lead to significant slowdown due to swapping (please decrease
JVM heap size, data region size or checkpoint buffer size) [required=3506MB,
available=1830MB]
2018-04-23 18:17:25.045  INFO 9519 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-23T18:17:25.034, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 0bc9e1e1-2765-42a1-8fb7-9a3696dda4e4
2018-04-23 18:17:25.059  INFO 9519 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-23T18:17:25.056, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 0bc9e1e1-2765-42a1-8fb7-9a3696dda4e4
2018-04-23 18:17:25.059  INFO 9519 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-23T18:17:25.056, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 0bc9e1e1-2765-42a1-8fb7-9a3696dda4e4
[18:17:25] Performance suggestions for grid  (fix if possible)
[18:17:25] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[18:17:25]   ^-- Disable grid events (remove 'includeEventTypes' from
configuration)
[18:17:25]   ^-- Enable G1 Garbage Collector (add '-XX:+UseG1GC' to JVM
options)
[18:17:25]   ^-- Set max direct memory size if getting 'OOME: Direct buffer
memory' (add '-XX:MaxDirectMemorySize=<size>[g|G|m|M|k|K]' to JVM options)
[18:17:25]   ^-- Speed up flushing of dirty pages by OS (alter
vm.dirty_expire_centisecs parameter by setting to 500)
[18:17:25]   ^-- Reduce pages swapping ratio (set vm.swappiness=10)
[18:17:25]   ^-- Decrease number of backups (set 'backups' to 0)
[18:17:25] Refer to this page for more performance suggestions:
https://apacheignite.readme.io/docs/jvm-and-system-tuning
[18:17:25]
[18:17:25] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[18:17:25]
[18:17:25] Ignite node started OK (id=0bc9e1e1)
[18:17:25] Topology snapshot [ver=2, servers=2, clients=0, CPUs=2,
offheap=4.7GB, heap=2.0GB]
[18:17:25] Data Regions Configured:
[18:17:25]   ^-- default [initSize=256.0 MiB, maxSize=366.1 MiB,
persistenceEnabled=false]
[18:17:25]   ^-- cc [initSize=2.0 GiB, maxSize=2.0 GiB,
persistenceEnabled=false]
[18:18:07] Topology snapshot [ver=3, servers=3, clients=0, CPUs=3,
offheap=7.1GB, heap=3.0GB]
[18:18:07] Data Regions Configured:
[18:18:07]   ^-- default [initSize=256.0 MiB, maxSize=366.1 MiB,
persistenceEnabled=false]
[18:18:07]   ^-- cc [initSize=2.0 GiB, maxSize=2.0 GiB,
persistenceEnabled=false]


After then, I execute cluster activate in node1 like below
$> control.sh --activate
Control utility [ver. 2.4.0#20180305-sha1:aa342270]
2018 Copyright(C) Apache Software Foundation
User: root
--------------------------------------------------------------------------------
Cluster activated

below is status
$> control.sh --baseline
Control utility [ver. 2.4.0#20180305-sha1:aa342270]
2018 Copyright(C) Apache Software Foundation
User: root
--------------------------------------------------------------------------------
Cluster state: active
Current topology version: 3

Baseline nodes:
    ConsistentID=node1, STATE=ONLINE
    ConsistentID=node2, STATE=ONLINE
    ConsistentID=node3, STATE=ONLINE
--------------------------------------------------------------------------------
Number of baseline nodes: 3

Other nodes not found.

Then I shut down node2 for restart(in node2)
$>service tomcat stop

As soon as stopping tomcat node2, below log is written at node1, 3

[17:37:20] Topology snapshot [ver=4, servers=2, clients=0, CPUs=2,
offheap=4.7GB, heap=2.0GB]
[17:37:20] Data Regions Configured:
[17:37:20]   ^-- default [initSize=256.0 MiB, maxSize=366.1 MiB,
persistenceEnabled=false]
[17:37:20]   ^-- cc [initSize=2.0 GiB, maxSize=2.0 GiB,
persistenceEnabled=true]
2018-04-24 17:37:21.355  INFO 26507 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-24T17:37:21.349, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 36abbd68-20ee-4e22-aa9a-43af1dfdf231
2018-04-24 17:37:21.356  INFO 26507 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-24T17:37:21.349, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 36abbd68-20ee-4e22-aa9a-43af1dfdf231
2018-04-24 17:37:21.356  INFO 26507 --- [ange-worker-#36]
c.p.e.s.c.c.EventListenerConfigurator    : Event - time :
2018-04-24T17:37:21.349, name : CACHE_REBALANCE_STARTED, type : 80, msg:
Cache rebalancing event., nodeId : 36abbd68-20ee-4e22-aa9a-43af1dfdf231

I don't know what is wrong.

please consider, I am newbie ignite. I hope to your help



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

Reply via email to