Hi, I am using Ignite 2.4 version. Please find attached the log files. Log file agms-web is a client node log and agms-core is server node log.
Ignite configuration on client node is as follows. When I try to get the
cache contents on client node after data push operation, my request hangs
on ignite.cache(getCacheName()) code and throws following exception. But if
I fire the same request again, code ignite.cache(getCacheName()) for
cache "IP_CONTAINER_IPV4_CACHE" returns null. When I debugged on server
node, this cache is present and data is being pushed to this cache by
ignite runnable task.
Exception on first request :
2018-07-05 18:18:34,127 108076 [exchange-worker-#37%springDataNode%] ERROR
o.a.i.i.p.c.GridCachePartitionExchangeManager - Failed to process custom
exchange task: ClientCacheChangeDummyDiscoveryMessage
[reqId=23767a7f-3437-4d20-9993-36d5d88a8860, cachesToClose=null,
startCaches=[IP_CONTAINER_IPV4_CACHE]]
org.apache.ignite.IgniteException: Spring application context resource is
not injected.
at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:30)
at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.startStoreSessionListeners(GridCacheUtils.java:1403)
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:241)
at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:64)
@Configuration
@Profile({"prod", "default"})
public class IgniteAppConfig {
@Value("${ignite.data_storage_path}")
private String dataStoragePath;
@Bean
public IgniteSpringBean igniteInstance() {
IgniteSpringBean ignite = new IgniteSpringBean();
ignite.setConfiguration(getIgniteConfiguration(ignite));
return ignite;
}
private IgniteConfiguration getIgniteConfiguration(IgniteSpringBean ignite) {
String HOST = "127.0.0.1:47500..47509";
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Collections.singletonList(HOST));
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(discoSpi);
cfg.setIgniteInstanceName("springDataNode");
cfg.setPeerClassLoadingEnabled(false);
cfg.setRebalanceThreadPoolSize(4);
//cfg.setLifecycleBeans(new IgniteLifeCycleBean());
cfg.setClientMode(true);
return cfg;
}
}
@Override
public FieldsQueryCursor<List<?>>
getFieldResultsByCriteria(Serializable customCriteria) {
QueryCriteria criteria = (QueryCriteria) customCriteria;
SqlFieldsQuery sqlFieldsQuery = new
SqlFieldsQuery(criteria.getStatement()).setArgs(criteria.getArgs());
sqlFieldsQuery.setDistributedJoins(criteria.isDistributeJoins());
return cache().query(sqlFieldsQuery);
}
protected abstract String getCacheName();
protected IgniteCache<K, T> cache() {
return ignite.cache(getCacheName());
}
IP_CONTAINER_IPV4_CACHE
private CacheConfiguration ipContainerIPV4CacheCfg() {
CacheConfiguration ipContainerIpV4CacheCfg = new
CacheConfiguration<>(CacheName.IP_CONTAINER_IPV4_CACHE.name());
ipContainerIpV4CacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ipContainerIpV4CacheCfg.setWriteThrough(true);
ipContainerIpV4CacheCfg.setReadThrough(false);
ipContainerIpV4CacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
ipContainerIpV4CacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
ipContainerIpV4CacheCfg.setBackups(1);
//SpringCacheStoreFactory springCacheStoreFactory = new
SpringCacheStoreFactory(DefaultCacheLoader.class);
Factory<IpContainerIpV4CacheLoader> storeFactory =
FactoryBuilder.factoryOf(IpContainerIpV4CacheLoader.class);
ipContainerIpV4CacheCfg.setCacheStoreFactory(storeFactory);
ipContainerIpV4CacheCfg.setIndexedTypes(DefaultDataAffinityKey.class,
IpContainerIpV4Data.class);
ipContainerIpV4CacheCfg.setCacheStoreSessionListenerFactories(cacheStoreSessionListenerFactory());
RendezvousAffinityFunction affinityFunction = new
RendezvousAffinityFunction();
affinityFunction.setExcludeNeighbors(true);
ipContainerIpV4CacheCfg.setAffiy(affinityFunction);
return ipContainerIpV4CacheCfg;
}
@Bean
public CacheStoreSessionListenerFactory cacheStoreSessionListenerFactory() {
return new CacheStoreSessionListenerFactory(CacheStoreSessionListener.class);
}
Thanks
Prasad
On Thu, Jul 5, 2018 at 5:57 PM slava.koptilin <[email protected]>
wrote:
> Hello Prasad,
>
> I cannot reproduce the behavior that you described.
> Please share the code that the community can use in order to reproduce the
> issue.
> It would be nice to have log files from both nodes (client and server).
>
> One more thing. Could you please share the version of Apache Ignite that
> you
> are using?
>
> Thanks!
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
agm-web.log
Description: Binary data
agm-core.log
Description: Binary data
