You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by okiesong <yj...@gmail.com> on 2018/07/24 20:28:23 UTC

Ignite Cluster with remote server + Cassandra Persistence

How can I use Ignite cluster with remote servers? 

Currently, I am getting a below error. FYI, I have already configured my
TcpDiscoveryVmIpFinder and TcpCommunicationSpi correctly, but for some
reason, it is pointing at 10.209.236.58 which is from localhost, and thus
the server is not able to connect with those ip address. FYI I have already
included jar file under ignite's lib folder which also contains Pojo class
for Cassandra Persistency Settings.   

I have already read
http://apache-ignite-users.70518.x6.nabble.com/Remote-client-tt19574.html#a19591

which is the exact problem I was having, but the thread was never answered
properly. 

[14:43:58,405][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532457838379], nodeId=b2b939cb, evt=NODE_JOINED] 
java.lang.NullPointerException 
        at
org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155) 
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:313) 
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299) 
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) 
        at java.lang.Thread.run(Thread.java:748) 
[14:43:58,411][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will not
start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
[evtNode=TcpDiscoveryNode [id=b2b939cb-35c1-4aab-8085-309253f6e196,
addrs=[0:0:0:0:0:0:0:1, 10.209.236.58, 127.0.0.1],
sockAddrs=[/10.209.236.58:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500],
discPort=47500, order=2, intOrder=2, lastExchangeTime=1532457828204,
loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532457838379], crd=TcpDiscoveryNode
[id=b0f4894f-a8ab-4ee9-94d7-62816e711e24, addrs=[10.240.192.65, 127.0.0.1],
sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
discPort=47500, order=1, intOrder=1, lastExchangeTime=1532457838369,
loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532457838379], nodeId=b2b939cb, evt=NODE_JOINED], added=true,
initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
hash=151552096], init=false, lastVer=null, partReleaseFut=null,
exchActions=null, affChangeMsg=null, initTs=1532457838379,
centralizedAff=false, forceAffReassignment=false, changeGlobalStateE=null,
done=true, state=CRD, evtLatch=0,
remaining=[b2b939cb-35c1-4aab-8085-309253f6e196], super=GridFutureAdapter
[ignoreInterrupts=false, state=DONE, res=java.lang.NullPointerException,
hash=746462951]] 
class org.apache.ignite.IgniteCheckedException: null 
        at
org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307) 
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259) 
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:207) 
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159) 
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2433) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299) 
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) 
        at java.lang.Thread.run(Thread.java:748) 
Caused by: java.lang.NullPointerException 
        at
org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155) 
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:313) 
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59) 
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945) 
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419) 
        ... 3 more 
[14:43:58,435][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=3,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=3,
nodeId8=b0f4894f, msg=Node failed: TcpDiscoveryNode
[id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
intOrder=2, lastExchangeTime=1532457828204, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
tstamp=1532457838390], nodeId=b2b939cb, evt=NODE_FAILED] 
java.lang.IllegalStateException: Affinity for topology version is not
initialized [locNode=b0f4894f-a8ab-4ee9-94d7-62816e711e24,
grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=3,
minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
history=[]] 
        at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1716) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2672) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149) 
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419) 
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299) 
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) 




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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Ok, thanks again. I will try it today and let you know the result. Just
wondering, can I know why we are creating a custom
CassandraCacheStoreFactory? Thanks in advance.



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, I am basically starting Ignite node through my Java project. When I run
the above specified code, I first run the ignite.sh from my remote server as
well. 



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, can I get an update on this? I am just wondering how I should approach
this problem. Thanks again!



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, does anyone have a solution to the problem I am having right now? thanks
in advance. I really need an input for this problem. 



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hello,

The first problem is related to a bug in the implementation of `PojoField`
class.
This is a known issue https://issues.apache.org/jira/browse/IGNITE-8788
Unfortunately, that bug is not resolved yet.
In any way, the workaround that I provided above should do a trick.

The second issue is `java.lang.IllegalStateException: Affinity for topology
version is not initialized`
and it seems that this exception does not relate to the original issue with
CassandraCacheStoreFactory.
I would suggest to the following:
 - disable IPv6 on all nodes via JVM option -Djava.net.preferIPv4Stack=true
for example
 - enable debug logging via JVM option -DIGNITE_QUIET=false or "-v" to
ignite.{sh|bat}
 - try to reproduce the issue, collect all log files from all nodes and
attach these files to a new message
   I think it will be the best approach to get help from the community.

Thanks,
S.

чт, 2 авг. 2018 г. в 16:49, okiesong <yj...@gmail.com>:

> I also found this while trying to resolve this problem which is still
> unresolved.
>
> https://issues.apache.org/jira/browse/IGNITE-5998
>
> Will this be impacted?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
I also found this while trying to resolve this problem which is still
unresolved. 

https://issues.apache.org/jira/browse/IGNITE-5998

Will this be impacted?



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hello,

> Just wondering, can I know why we are creating a custom
CassandraCacheStoreFactory?
It seems that the problem is PojoField#accessor field which is declared as
`transient` and so this field is not serialized/deserialized. Therefore, it
can lead to NullPointerException. The `PojoField` class is a part of
`KeyPersistenceSettings`.
It looks like a bug. I will try to debug that issue deeper and file a
ticket in order to track that.
So, the suggested workaround is trying to avoid that issue.

> java.lang.IllegalStateException: Affinity for topology version is not
initialized
Well, that exception does not relate to the original issue.
Please make sure that there are no other running nodes in the cluster.
Let's try from the scratch - stop all nodes, clean up working directories
and update your classes on all participating nodes before testing the
workaround.

Thanks,
S.


чт, 26 июл. 2018 г. в 18:49, okiesong <yj...@gmail.com>:

> Hi, first of all, thanks once again, I have tried your approach (after
> uploading new jar to lib folder as a new class was introduced), but I am
> getting a below error. FYI, "ignite-cass-delta" is the name of the default
> cache name I am using. Thanks again!
>
> [11:36:25] Topology snapshot [ver=9, servers=1, clients=0, CPUs=16,
> offheap=13.0GB, heap=1.0GB]
> [11:36:25]   ^-- Node [id=C1BAABB3-413C-4867-9F8A-CC21CA818E80,
> clusterState=ACTIVE]
> [11:36:25] Data Regions Configured:
> [11:36:25]   ^-- default [initSize=256.0 MiB, maxSize=12.6 GiB,
> persistenceEnabled=false]
> [11:36:25,574][SEVERE][exchange-worker-#62][GridCacheProcessor] Failed to
> register MBean for cache group: null
> javax.management.InstanceAlreadyExistsException:
> org.apache:clsLdr=764c12b6,group="Cache groups",name="ignite-cass-delta"
>         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.registerMBean(IgniteUtils.java:4573)
>         at
>
> org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:2054)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1938)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
>
> [11:36:25,580][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=8,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
> nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_JOINED]
> class org.apache.ignite.IgniteCheckedException: Failed to register MBean
> for
> component:
>
> org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4159)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1690)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.management.InstanceAlreadyExistsException:
>
> org.apache:clsLdr=764c12b6,group="ignite-cass-delta",name="org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl"
>         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.registerMBean(IgniteUtils.java:4573)
>         at
>
> org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4155)
>         ... 8 more
>
> [11:36:25,583][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
> Failed to wait for completion of partition map exchange (preloading will
> not
> start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
> [evtNode=TcpDiscoveryNode [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962,
> addrs=[0:0:0:0:0:0:0:1, 10.252.198.106, 127.0.0.1],
> sockAddrs=[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /10.252.198.106:47500
> ],
> discPort=47500, order=8, intOrder=5, lastExchangeTime=1532619375511,
> loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
> nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532619385566], crd=TcpDiscoveryNode
> [id=c1baabb3-413c-4867-9f8a-cc21ca818e80, addrs=[10.240.192.65, 127.0.0.1],
> sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
> discPort=47500, order=1, intOrder=1, lastExchangeTime=1532619385566,
> loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
> [topVer=8,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
> nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_JOINED], added=true,
> initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
> hash=1585243052], init=false, lastVer=null, partReleaseFut=null,
> exchActions=null, affChangeMsg=null, initTs=1532619385566,
> centralizedAff=false, forceAffReassignment=false, changeGlobalStateE=null,
> done=true, state=CRD, evtLatch=0,
> remaining=[c8f39e6b-9e13-47c7-8f6c-570b38afa962], super=GridFutureAdapter
> [ignoreInterrupts=false, state=DONE, res=class
> o.a.i.IgniteCheckedException:
> Failed to register MBean for component:
> o.a.i.i.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57,
> hash=567392195]]
> class org.apache.ignite.IgniteCheckedException: Failed to register MBean
> for
> component:
>
> org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4159)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1690)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.management.InstanceAlreadyExistsException:
>
> org.apache:clsLdr=764c12b6,group="ignite-cass-delta",name="org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl"
>         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.registerMBean(IgniteUtils.java:4573)
>         at
>
> org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4155)
>         ... 8 more
>
> [11:36:25,591][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
> nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
> tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_FAILED]
> java.lang.IllegalStateException: Affinity for topology version is not
> initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
> grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
> history=[]]
>         at
>
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599)
>         at
>
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAssignments(GridAffinityAssignmentCache.java:474)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.beforeExchange(GridDhtPartitionTopologyImpl.java:534)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2520)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
>
> [11:36:25,593][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
> Failed to wait for completion of partition map exchange (preloading will
> not
> start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
> [evtNode=TcpDiscoveryNode [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962,
> addrs=[0:0:0:0:0:0:0:1, 10.252.198.106, 127.0.0.1],
> sockAddrs=[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /10.252.198.106:47500
> ],
> discPort=47500, order=8, intOrder=5, lastExchangeTime=1532619375511,
> loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
> nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
> tstamp=1532619385566], crd=TcpDiscoveryNode
> [id=c1baabb3-413c-4867-9f8a-cc21ca818e80, addrs=[10.240.192.65, 127.0.0.1],
> sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
> discPort=47500, order=1, intOrder=1, lastExchangeTime=1532619385566,
> loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
> [topVer=9,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
> nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
> [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
> 10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
> /127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
> intOrder=5, lastExchangeTime=1532619375511, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
> tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_FAILED], added=true,
> initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
> hash=636149], init=false, lastVer=null,
> partReleaseFut=PartitionReleaseFuture [topVer=AffinityTopologyVersion
> [topVer=9, minorTopVer=0], futures=[ExplicitLockReleaseFuture
> [topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0], futures=[]],
> AtomicUpdateReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], futures=[]], DataStreamerReleaseFuture
> [topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0], futures=[]],
> LocalTxReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], futures=[]], AllTxReleaseFuture
> [topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0],
> futures=[RemoteTxReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], futures=[]]]]]], exchActions=null, affChangeMsg=null,
> initTs=1532619385576, centralizedAff=false, forceAffReassignment=false,
> changeGlobalStateE=null, done=true, state=CRD, evtLatch=0, remaining=[],
> super=GridFutureAdapter [ignoreInterrupts=false, state=DONE,
> res=java.lang.IllegalStateException: Affinity for topology version is not
> initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
> grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
> history=[]], hash=751464704]]
> class org.apache.ignite.IgniteCheckedException: Affinity for topology
> version is not initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
> grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
> history=[]]
>         at
> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:207)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>         at
>
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2433)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Affinity for topology version
> is
> not initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
> grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
> minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
> history=[]]
>         at
>
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599)
>         at
>
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAssignments(GridAffinityAssignmentCache.java:474)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.beforeExchange(GridDhtPartitionTopologyImpl.java:534)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2520)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149)
>         at
>
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712)
>         at
>
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>         ... 3 more
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, first of all, thanks once again, I have tried your approach (after
uploading new jar to lib folder as a new class was introduced), but I am
getting a below error. FYI, "ignite-cass-delta" is the name of the default
cache name I am using. Thanks again!

[11:36:25] Topology snapshot [ver=9, servers=1, clients=0, CPUs=16,
offheap=13.0GB, heap=1.0GB]
[11:36:25]   ^-- Node [id=C1BAABB3-413C-4867-9F8A-CC21CA818E80,
clusterState=ACTIVE]
[11:36:25] Data Regions Configured:
[11:36:25]   ^-- default [initSize=256.0 MiB, maxSize=12.6 GiB,
persistenceEnabled=false]
[11:36:25,574][SEVERE][exchange-worker-#62][GridCacheProcessor] Failed to
register MBean for cache group: null
javax.management.InstanceAlreadyExistsException:
org.apache:clsLdr=764c12b6,group="Cache groups",name="ignite-cass-delta"
        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.registerMBean(IgniteUtils.java:4573)
        at
org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:2054)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1938)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:748)
[11:36:25,580][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=8,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_JOINED]
class org.apache.ignite.IgniteCheckedException: Failed to register MBean for
component:
org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4159)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1690)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:748)
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache:clsLdr=764c12b6,group="ignite-cass-delta",name="org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl"
        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.registerMBean(IgniteUtils.java:4573)
        at
org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4155)
        ... 8 more
[11:36:25,583][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will not
start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
[evtNode=TcpDiscoveryNode [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962,
addrs=[0:0:0:0:0:0:0:1, 10.252.198.106, 127.0.0.1],
sockAddrs=[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /10.252.198.106:47500],
discPort=47500, order=8, intOrder=5, lastExchangeTime=1532619375511,
loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532619385566], crd=TcpDiscoveryNode
[id=c1baabb3-413c-4867-9f8a-cc21ca818e80, addrs=[10.240.192.65, 127.0.0.1],
sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
discPort=47500, order=1, intOrder=1, lastExchangeTime=1532619385566,
loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=8,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=8,
nodeId8=c1baabb3, msg=Node joined: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_JOINED], added=true,
initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
hash=1585243052], init=false, lastVer=null, partReleaseFut=null,
exchActions=null, affChangeMsg=null, initTs=1532619385566,
centralizedAff=false, forceAffReassignment=false, changeGlobalStateE=null,
done=true, state=CRD, evtLatch=0,
remaining=[c8f39e6b-9e13-47c7-8f6c-570b38afa962], super=GridFutureAdapter
[ignoreInterrupts=false, state=DONE, res=class o.a.i.IgniteCheckedException:
Failed to register MBean for component:
o.a.i.i.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57,
hash=567392195]]
class org.apache.ignite.IgniteCheckedException: Failed to register MBean for
component:
org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl@7a80ba57
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4159)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1690)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:748)
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache:clsLdr=764c12b6,group="ignite-cass-delta",name="org.apache.ignite.internal.processors.cache.CacheLocalMetricsMXBeanImpl"
        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.registerMBean(IgniteUtils.java:4573)
        at
org.apache.ignite.internal.util.IgniteUtils.registerMBean(IgniteUtils.java:4544)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.registerMbean(GridCacheProcessor.java:4155)
        ... 8 more
[11:36:25,591][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_FAILED]
java.lang.IllegalStateException: Affinity for topology version is not
initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
history=[]]
        at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599)
        at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAssignments(GridAffinityAssignmentCache.java:474)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.beforeExchange(GridDhtPartitionTopologyImpl.java:534)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2520)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:748)
[11:36:25,593][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will not
start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
[evtNode=TcpDiscoveryNode [id=c8f39e6b-9e13-47c7-8f6c-570b38afa962,
addrs=[0:0:0:0:0:0:0:1, 10.252.198.106, 127.0.0.1],
sockAddrs=[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /10.252.198.106:47500],
discPort=47500, order=8, intOrder=5, lastExchangeTime=1532619375511,
loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
tstamp=1532619385566], crd=TcpDiscoveryNode
[id=c1baabb3-413c-4867-9f8a-cc21ca818e80, addrs=[10.240.192.65, 127.0.0.1],
sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
discPort=47500, order=1, intOrder=1, lastExchangeTime=1532619385566,
loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=9,
nodeId8=c1baabb3, msg=Node failed: TcpDiscoveryNode
[id=c8f39e6b-9e13-47c7-8f6c-570b38afa962, addrs=[0:0:0:0:0:0:0:1,
10.252.198.106, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /10.252.198.106:47500], discPort=47500, order=8,
intOrder=5, lastExchangeTime=1532619375511, loc=false,
ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
tstamp=1532619385566], nodeId=c8f39e6b, evt=NODE_FAILED], added=true,
initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
hash=636149], init=false, lastVer=null,
partReleaseFut=PartitionReleaseFuture [topVer=AffinityTopologyVersion
[topVer=9, minorTopVer=0], futures=[ExplicitLockReleaseFuture
[topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0], futures=[]],
AtomicUpdateReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], futures=[]], DataStreamerReleaseFuture
[topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0], futures=[]],
LocalTxReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], futures=[]], AllTxReleaseFuture
[topVer=AffinityTopologyVersion [topVer=9, minorTopVer=0],
futures=[RemoteTxReleaseFuture [topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], futures=[]]]]]], exchActions=null, affChangeMsg=null,
initTs=1532619385576, centralizedAff=false, forceAffReassignment=false,
changeGlobalStateE=null, done=true, state=CRD, evtLatch=0, remaining=[],
super=GridFutureAdapter [ignoreInterrupts=false, state=DONE,
res=java.lang.IllegalStateException: Affinity for topology version is not
initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
history=[]], hash=751464704]]
class org.apache.ignite.IgniteCheckedException: Affinity for topology
version is not initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
history=[]]
        at
org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:207)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2433)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Affinity for topology version is
not initialized [locNode=c1baabb3-413c-4867-9f8a-cc21ca818e80,
grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=9,
minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
history=[]]
        at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599)
        at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAssignments(GridAffinityAssignmentCache.java:474)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.beforeExchange(GridDhtPartitionTopologyImpl.java:534)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2520)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
        ... 3 more




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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hello,

It seems I found the root cause of the issue. Could you please try the
following workaround?

1. create your own CacheStoreFactory

public class CustomCassandraCacheStoreFactory extends
CassandraCacheStoreFactory {
    private final String persistenceSettingsXml;

    public CustomCassandraCacheStoreFactory(String persistenceSettingsXml) {
        this.persistenceSettingsXml = persistenceSettingsXml;
    }

    @Override public CassandraCacheStore create() {
        setPersistenceSettings(new
KeyValuePersistenceSettings(persistenceSettingsXml));
        return super.create();
    }
}


2. configure Ignite cache as follows

CacheConfiguration<String, Integer> configuration = new CacheConfiguration<>();

configuration.setName("test-cache");
configuration.setIndexedTypes(String.class, POJOExample.class);
DataSource dataSource = new DataSource();
dataSource.setContactPoints("111.111.111.111"); // Here, I am
basically putting my remote server addresses.
RoundRobinPolicy robinPolicy = new RoundRobinPolicy();
dataSource.setLoadBalancingPolicy(robinPolicy);
dataSource.setReadConsistency("ONE");
dataSource.setWriteConsistency("ONE");



*String persistenceSettingsXml = FileUtils.readFileToString(new
File(persistenceSettingsConfig), "utf-8");CassandraCacheStoreFactory
cacheStoreFactory = new
CustomCassandraCacheStoreFactory(persistenceSettingsXml);cacheStoreFactory.setDataSource(dataSource);*

configuration.setCacheStoreFactory(cacheStoreFactory);
configuration.setWriteThrough(true);
configuration.setReadThrough(true);
configuration.setWriteBehindEnabled(true);


Thanks!

ср, 25 июл. 2018 г. в 21:19, okiesong <yj...@gmail.com>:

> Hi, so I have provided my code structures, just in case my POJOExample.java
> looks as below; this is used for key-value setting for persistence setting
> for Cassandra. Thanks once again!
>
> POJOExample.java
> public class POJOExample implements Serializable{
>
>
>     @QuerySqlField(index=true, descending = true,
> orderedGroups={@QuerySqlField.Group(name = "sample_idx", order = 0)})
>     private String id;
>
>     @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = "sample_idx",
> order = 1)})
>     private String name;
>
>
>     public ClientMatchRecord(String name, String id) {
>         this.bu1_id = bu1_id;
>         this.bu1_name = bu1_name;
>
>     }
>
>     public String getid() {
>         return id;
>     }
>
>     public void setid(String id) {
>         this.id = id;
>     }
>
>     public String getname() {
>         return name;
>     }
>
>     public void setname(String name) {
>         this.name = name;
>     }
>
>
> }
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, so I have provided my code structures, just in case my POJOExample.java
looks as below; this is used for key-value setting for persistence setting
for Cassandra. Thanks once again!

POJOExample.java
public class POJOExample implements Serializable{
    

    @QuerySqlField(index=true, descending = true,
orderedGroups={@QuerySqlField.Group(name = "sample_idx", order = 0)})
    private String id;
    
    @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = "sample_idx",
order = 1)})
    private String name;
    
    
    public ClientMatchRecord(String name, String id) {
        this.bu1_id = bu1_id;
        this.bu1_name = bu1_name;

    }

    public String getid() {
        return id;
    }

    public void setid(String id) {
        this.id = id;
    }

    public String getname() {
        return name;
    }

    public void setname(String name) {
        this.name = name;
    }

    
}



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Thanks in advance. 

I am basically using the sample xml provided for Ignite
TcpDiscoveryVmIpFinder, but with Cassandra third party persistence. 

public Ignite startIgnite {
IgniteConfiguration cfg = new IgniteConfiguration();
CacheConfiguration<String, POJOExample> configuration = new
CacheConfiguration<String, POJOExample>();

configuration.setName("test-cache");
configuration.setIndexedTypes(String.class, ValueClass.class);
    DataSource dataSource = new DataSource();
    dataSource.setContactPoints(""); // Here, I am basically putting my
remote server addresses. 
    RoundRobinPolicy robinPolicy = new RoundRobinPolicy();
    dataSource.setLoadBalancingPolicy(robinPolicy);
    dataSource.setReadConsistency("ONE");
    dataSource.setWriteConsistency("ONE");
    String persistenceSettingsXml = FileUtils.readFileToString(new
File(persistenceSettingsConfig), "utf-8");
    KeyValuePersistenceSettings persistenceSettings = new
KeyValuePersistenceSettings(persistenceSettingsXml);
    CassandraCacheStoreFactory cacheStoreFactory = new
CassandraCacheStoreFactory();
    cacheStoreFactory.setDataSource(dataSource);
    cacheStoreFactory.setPersistenceSettings(persistenceSettings);
    configuration.setCacheStoreFactory(cacheStoreFactory);
    configuration.setWriteThrough(true);
    configuration.setReadThrough(true);
    configuration.setWriteBehindEnabled(true);
    
//  Setting cache configuration
cfg.setCacheConfiguration(configuration);

TcpDiscoverySpi spi = setTcp();

cfg.setPeerClassLoadingEnabled(true); 
cfg.setDeploymentMode(DeploymentMode.CONTINUOUS);
cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration());		

// Override default discovery SPI.
cfg.setDiscoverySpi(spi);


//  Starting Ignite
Ignite ignite = Ignition.getOrStart(cfg);
return ignite; 
}

	public TcpDiscoverySpi setTcp() {
		TcpDiscoverySpi spi = new TcpDiscoverySpi();
		
		TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();		
		// Set initial IP addresses.
		// Note that you can optionally specify a port or a port range.
		ipFinder.setAddresses(Arrays.asList("111.111.111.111:47500..47509"));
		 
		spi.setIpFinder(ipFinder);
		
		return spi;
	}

*Persistency Settings:*
<persistence keyspace="ignite" table="odbc_test" ttl="86400">
    <keyspaceOptions>
        REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}
        AND DURABLE_WRITES = true
    </keyspaceOptions>
    <tableOption>
        comment = 'Cache test'
        AND read_repair_chance = 0.2
    </tableOption>
    <keyPersistence class="java.lang.String" strategy="PRIMITIVE"
column="key"/>
    <valuePersistence class="com.sample.ignite.POJOExample"
strategy="POJO"/>
</persistence>



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Thanks in advance. (This may be duplicate, as I forgot to put few other
details. ) 

I am basically using the sample xml provided for Ignite
TcpDiscoveryVmIpFinder, but with Cassandra third party persistence. 

public Ignite startIgnite { 
IgniteConfiguration cfg = new IgniteConfiguration(); 
CacheConfiguration<String, POJOExample> configuration = new
CacheConfiguration<String, POJOExample>(); 

configuration.setName("test-cache"); 
configuration.setIndexedTypes(String.class, POJOExample.class); 
    DataSource dataSource = new DataSource(); 
    dataSource.setContactPoints("111.111.111.111"); // Here, I am basically
putting my remote server addresses. 
    RoundRobinPolicy robinPolicy = new RoundRobinPolicy(); 
    dataSource.setLoadBalancingPolicy(robinPolicy); 
    dataSource.setReadConsistency("ONE"); 
    dataSource.setWriteConsistency("ONE"); 
    String persistenceSettingsXml = FileUtils.readFileToString(new
File(persistenceSettingsConfig), "utf-8"); 
    KeyValuePersistenceSettings persistenceSettings = new
KeyValuePersistenceSettings(persistenceSettingsXml); 
    CassandraCacheStoreFactory cacheStoreFactory = new
CassandraCacheStoreFactory(); 
    cacheStoreFactory.setDataSource(dataSource); 
    cacheStoreFactory.setPersistenceSettings(persistenceSettings); 
    configuration.setCacheStoreFactory(cacheStoreFactory); 
    configuration.setWriteThrough(true); 
    configuration.setReadThrough(true); 
    configuration.setWriteBehindEnabled(true); 
    
//  Setting cache configuration 
cfg.setCacheConfiguration(configuration); 

TcpDiscoverySpi spi = setTcp(); 

cfg.setPeerClassLoadingEnabled(true); 
cfg.setDeploymentMode(DeploymentMode.CONTINUOUS); 
cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration());	

// Override default discovery SPI. 
cfg.setDiscoverySpi(spi); 


//  Starting Ignite 
Ignite ignite = Ignition.getOrStart(cfg); 
return ignite; 
} 

        public TcpDiscoverySpi setTcp() { 
                TcpDiscoverySpi spi = new TcpDiscoverySpi(); 
                
                TcpDiscoveryVmIpFinder ipFinder = new
TcpDiscoveryVmIpFinder();	
                // Set initial IP addresses. 
                // Note that you can optionally specify a port or a port
range. 
               
ipFinder.setAddresses(Arrays.asList("111.111.111.111:47500..47509")); 
                  
                spi.setIpFinder(ipFinder); 
                
                return spi; 
        } 

Persistency Settings:
<persistence keyspace="ignite" table="odbc_test" ttl="86400">
    <keyspaceOptions>
        REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1} 
        AND DURABLE_WRITES = true 
    </keyspaceOptions>
    <tableOption>
        comment = 'Cache test' 
        AND read_repair_chance = 0.2 
    </tableOption>
    <keyPersistence class="java.lang.String" strategy="PRIMITIVE"
column="key"/>
    <valuePersistence class="com.sample.ignite.POJOExample"
strategy="POJO"/>
</persistence>



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by okiesong <yj...@gmail.com>.
Hi, so I have provided my code structures, just in case my POJOExample.java 
looks as below; this is used for key-value setting for persistence setting 
for Cassandra. Thanks once again! 

POJOExample.java 
public class POJOExample implements Serializable{ 
    

    @QuerySqlField(index=true, descending = true, 
orderedGroups={@QuerySqlField.Group(name = "sample_idx", order = 0)}) 
    private String id; 
    
    @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = "sample_idx", 
order = 1)}) 
    private String name; 
    
    
    public ClientMatchRecord(String name, String id) { 
        this.id = id; 
        this.name = name; 

    } 

    public String getid() { 
        return id; 
    } 

    public void setid(String id) { 
        this.id = id; 
    } 

    public String getname() { 
        return name; 
    } 

    public void setname(String name) { 
        this.name = name; 
    } 

    
} 



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

Re: Ignite Cluster with remote server + Cassandra Persistence

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hello,

It does not seem to me, that the issue is somehow related to the thread you
mentioned.
I bet the root cause of the problem is a misconfiguration. At least, the
exception message tells me that CassandraCacheStore class cannot be
initialized for some reason:
java.lang.NullPointerException
        at
org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155)
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:313)
        at
org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85)
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106)
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
        at
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)

Could you please share ignite configuration and persistence settings you
are using?

Thanks,
S.

вт, 24 июл. 2018 г. в 23:28, okiesong <yj...@gmail.com>:

> How can I use Ignite cluster with remote servers?
>
> Currently, I am getting a below error. FYI, I have already configured my
> TcpDiscoveryVmIpFinder and TcpCommunicationSpi correctly, but for some
> reason, it is pointing at 10.209.236.58 which is from localhost, and thus
> the server is not able to connect with those ip address. FYI I have already
> included jar file under ignite's lib folder which also contains Pojo class
> for Cassandra Persistency Settings.
>
> I have already read
>
> http://apache-ignite-users.70518.x6.nabble.com/Remote-client-tt19574.html#a19591
>
> which is the exact problem I was having, but the thread was never answered
> properly.
>
>
> [14:43:58,405][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
> nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532457838379], nodeId=b2b939cb, evt=NODE_JOINED]
> java.lang.NullPointerException
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155)
>
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:313)
>
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
>
> [14:43:58,411][SEVERE][exchange-worker-#62][GridCachePartitionExchangeManager]
> Failed to wait for completion of partition map exchange (preloading will
> not
> start): GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
> [evtNode=TcpDiscoveryNode [id=b2b939cb-35c1-4aab-8085-309253f6e196,
> addrs=[0:0:0:0:0:0:0:1, 10.209.236.58, 127.0.0.1],
> sockAddrs=[/10.209.236.58:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500
> ],
> discPort=47500, order=2, intOrder=2, lastExchangeTime=1532457828204,
> loc=false, ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
> nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532457838379], crd=TcpDiscoveryNode
> [id=b0f4894f-a8ab-4ee9-94d7-62816e711e24, addrs=[10.240.192.65, 127.0.0.1],
> sockAddrs=[ulvcdpd02.devfg.rbc.com/10.240.192.65:47500, /127.0.0.1:47500],
> discPort=47500, order=1, intOrder=1, lastExchangeTime=1532457838369,
> loc=true, ver=2.5.0#20180523-sha1:86e110c7, isClient=false],
> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
> [topVer=2,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=2,
> nodeId8=b0f4894f, msg=Node joined: TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_JOINED,
> tstamp=1532457838379], nodeId=b2b939cb, evt=NODE_JOINED], added=true,
> initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
> hash=151552096], init=false, lastVer=null, partReleaseFut=null,
> exchActions=null, affChangeMsg=null, initTs=1532457838379,
> centralizedAff=false, forceAffReassignment=false, changeGlobalStateE=null,
> done=true, state=CRD, evtLatch=0,
> remaining=[b2b939cb-35c1-4aab-8085-309253f6e196], super=GridFutureAdapter
> [ignoreInterrupts=false, state=DONE, res=java.lang.NullPointerException,
> hash=746462951]]
> class org.apache.ignite.IgniteCheckedException: null
>         at
> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:207)
>
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2433)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155)
>
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:313)
>
>         at
> org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>
>         at
> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startReceivedCaches(GridCacheProcessor.java:1864)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:667)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>
>         ... 3 more
>
> [14:43:58,435][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=3,
> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], topVer=3,
> nodeId8=b0f4894f, msg=Node failed: TcpDiscoveryNode
> [id=b2b939cb-35c1-4aab-8085-309253f6e196, addrs=[0:0:0:0:0:0:0:1,
> 10.209.236.58, 127.0.0.1], sockAddrs=[/10.209.236.58:47500,
> /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500], discPort=47500, order=2,
> intOrder=2, lastExchangeTime=1532457828204, loc=false,
> ver=2.5.0#20180523-sha1:86e110c7, isClient=false], type=NODE_FAILED,
> tstamp=1532457838390], nodeId=b2b939cb, evt=NODE_FAILED]
> java.lang.IllegalStateException: Affinity for topology version is not
> initialized [locNode=b0f4894f-a8ab-4ee9-94d7-62816e711e24,
> grp=ignite-cass-delta, topVer=AffinityTopologyVersion [topVer=3,
> minorTopVer=0], head=AffinityTopologyVersion [topVer=-1, minorTopVer=0],
> history=[]]
>         at
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.readyAffinity(GridAffinityAssignmentCache.java:599)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1716)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.finishExchangeOnCoordinator(GridDhtPartitionsExchangeFuture.java:2672)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onAllReceived(GridDhtPartitionsExchangeFuture.java:2467)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:1149)
>
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:712)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>