I am seeing following error when I enable persistence mode.
[main] - ERROR - Failed to get Ignite Grid is in invalid state to perform
this operation. It either not started yet or has already being or have
stopped [igniteInstanceName=null, state=STOPPED]
Some background
My servernode is runningon a separate machine. I see this in the logs
Dec 27, 2017 12:36:15 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Topology snapshot [ver=2, servers=1, clients=1, CPUs=20, heap=1.9GB]
Dec 27, 2017 12:36:15 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Sending activate request from node
[id=50b5d870-50dd-44cd-8a1c-5be5c3542aa7, topVer=AffinityTopologyVersion
[topVer=2, minorTopVer=0], client=true, daemon=false]
Dec 27, 2017 12:36:19 PM org.apache.ignite.logger.java.JavaLogger info
and then many lines later. I see this.
NFO: Successfully performed final activation steps
[nodeId=50b5d870-50dd-44cd-8a1c-5be5c3542aa7, client=true,
topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1]]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Stopped cache [cacheName=Lables]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Stopped cache [cacheName=ignite-sys-cache]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Removed undeployed class: GridDeployment [ts=1514396175130,
depMode=SHARED, clsLdr=java.net.URLClassLoader@7edbc5dd,
clsLdrId=72b8b099061-50b5d870-50dd-44cd-8a1c-5be5c3542aa7, userVer=0,
loc=true,
sampleClsName=org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$ClientChangeGlobalStateComputeRequest,
pendingUndeploy=false, undeployed=true, usage=0]
In my code in debug mode I can see the Ignite instance but then it goes to
null and I get the above mentioned exception.
This is the code I am using to return an instance of ignite to downstream,
is something wrong in this. Do I need a different way to return it please
advise
public static Ignite createAnIgniteInstance() throws InvIgniteException {
Ignite ctIgnite = null;
if(StringUtils.isEmpty(System.getProperty(IGNITE_CLIENT_CONFIG_PROP))){
log.warn("Default Ignite node will be created as client node");
Ignition.setClientMode(true);
}else{
Ignition.setClientMode(new
Boolean(System.getProperty(IGNITE_CLIENT_CONFIG_PROP)));
}
if(StringUtils.isEmpty(System.getProperty(IGNITE_CONFIG_FILE_PROP))){
log.warn("No configuration file supplied, using default config
file: {}", IGNITE_DEFAULT_CONFIG_FILE);
try(Ignite ignited =
Ignition.start(IGNITE_DEFAULT_CONFIG_FILE)){
ignited.active(true);
ctIgnite = ignited;
}
}else{
try(Ignite ignited =
Ignition.start(System.getProperty(IGNITE_CONFIG_FILE_PROP))){
ignited.active(true);
ctIgnite = ignited;
}
}
return ctIgnite;
}
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/