Possibly, it is already fixed. Please, try to upgrade to the latest version.
On Fri, Jun 8, 2018 at 5:25 PM HEWA WIDANA GAMAGE, SUBASH < [email protected]> wrote: > Hi Andrey, > > Thank you very much for the prompt response. > > > > We have only one node in a JVM. > > > > > > This is my grid config. We use 1.9.0 Ignite. > > > > IgniteConfiguration cfg = *new *IgniteConfiguration(); > > cfg.setPeerClassLoadingEnabled(*false*); > > cfg.setLifecycleBeans(*new *LogLifecycleBean()); > > TcpDiscoverySpi discoverySpi = *new *TcpDiscoverySpi(); > > TcpDiscoveryVmIpFinder ipFinder = *new *TcpDiscoveryVmIpFinder(); > Collection<String> addressSet = *new *HashSet<>(); > *for *(String address : *ipList*) { > addressSet.add(address); > } > ipFinder.setAddresses(addressSet); > > discoverySpi.setJoinTimeout(10000); > discoverySpi.setLocalPort(47500); > discoverySpi.setIpFinder(ipFinder); > > cfg.setDiscoverySpi(discoverySpi); > > > > And this is the cache config. We don’t set cache group specifically. > > > > CacheConfiguration<String, String> cc = *new *CacheConfiguration(); > > cc.setName(*"mycache"*); > cc.setBackups(1); > cc.setCacheMode(CacheMode.*PARTITIONED*); > cc.setAtomicityMode(CacheAtomicityMode.*ATOMIC*); > > LruEvictionPolicy evpl = *new *LruEvictionPolicy(); > evpl.setMaxSize(10000); > > cc.setEvictionPolicy(evpl); > > cc.setExpiryPolicyFactory(CreatedExpiryPolicy.*factoryOf*( > *new *Duration(TimeUnit.*SECONDS*, 15))); > > cc.setStatisticsEnabled(*true*); > > > > > > > > *From:* Andrey Mashenkov [mailto:[email protected]] > *Sent:* Friday, June 08, 2018 10:02 AM > *To:* [email protected] > *Subject:* Re: Error while Starting Grid: > javax.management.InstanceAlreadyExistsException: (LruEvictionPolicy) > > > > Hi, > > > > Looks like a bug. > > > > Can you share grid configuration? > > Do you have more than one node in same JVM? > > Do you have configure cache groups manually? > > > > On Fri, Jun 8, 2018 at 4:48 PM, HEWA WIDANA GAMAGE, SUBASH < > [email protected]> wrote: > > Hi everyone, > > > > As a quick note on what we do here, we listen to NODE_FAILED, and > NODE_SEGMENTED events and upon such events, we use Ignition.stopAll(true) > and Ignition.start() to restart the Ignite grid in a given JVM. Here Ignite > does not starts as a standalone process by itself, but bootstrap > programmatically since it’s meant to be a part of some other main process. > > > > So we received a NODE_FAILED evet and restarted Ignite where we see > following error and start fails. And “mycache” is created with LRU > eviction policy at Ignite startup process. > > > > As per error, it tries to registering an LruEvictionPolicy MBean twice. We > use a cache named mycache in PARTITIONED mode with 4 nodes in the cluster. > Any idea for this behavior ? > > > > > > org.apache.ignite.IgniteException: Failed to register MBean for component: > LruEvictionPolicy [max=100000, batchSize=1, maxMemSize=524288000, > memSize=0, size=0] > at > org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:946) > at org.apache.ignite.Ignition.start(Ignition.java:325) > at com.test.IgniteRuntime.start(IgniteRuntime.java:87) > at > com.test.segmentation.SegmentationResolver.recycle(SegmentationResolver.java:61) > at > com.test.RandomizedDelayResolver.resolve(RandomizedDelayResolver.java:47) > at > com.test.SegmentationProcessor.lambda$init$2(SegmentationProcessor.java:95) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > Caused by: org.apache.ignite.IgniteCheckedException: Failed to register > MBean for component: LruEvictionPolicy [max=100000, batchSize=1, > maxMemSize=524288000, memSize=0, size=0] > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:3518) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:557) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:529) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1306) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:801) > at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:959) > at > org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1799) > at > org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1602) > at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516) > at org.apache.ignite.Ignition.start(Ignition.java:322) > ... 11 common frames omitted > Caused by: javax.management.InstanceAlreadyExistsException: > org.apache:clsLdr=764c12b6,group=mycache,name=org.apache.ignite.cache.eviction.lru.LruEvictionPolicy > at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.ignite.internal.util.IgniteUtils.registerCacheMBean(IgniteUtils.java:4523) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:3514) > ... 22 common frames omitted > > > > > > > > > > > > > > -- > > Best regards, > Andrey V. Mashenkov > -- Best regards, Andrey V. Mashenkov
