Description
Attempt to stop already stopped cache causes the exception:
1. Start node by bin\ignite.bat examples\config\example-cache.xml
2. Start visorcmd and open examples\config\example-cache.xml:
visor> cache -stop -c=@c0 Are you sure you want to stop cache: <default>? (y/n) [n]: y Visor successfully stop cache: <default> visor> cache -stop -c=@c0 Are you sure you want to stop cache: <default>? (y/n) [n]: y [18:11:24,919][SEVERE][ignite-#29%mgmt-null%][GridTaskWorker] Failed to reduce job results due to un declared user exception [task=o.a.i.i.v.cache.VisorCacheStopTask@40faccdf, err=class o.a.i.compute.C omputeUserUndeclaredException: Failed to execute job due to unexpected runtime exception [jobId=d95d e649c41-77f2a613-7845-434b-bebf-d2e7acc3b877, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskN ame=visor-cstop-task, dep=LocalDeployment [super=GridDeployment [ts=1428419255152, depMode=SHARED, c lsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, clsLdrId=07b1c649c41-77f2a613-7845-434b-bebf-d2e7ac c3b877, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false , usage=0]], taskClsName=o.a.i.i.v.cache.VisorCacheStopTask, sesId=c95de649c41-75c692a5-a1d3-40c8-a4 10-bfdb6d98c44c, startTime=1428419484904, endTime=9223372036854775807, taskNodeId=75c692a5-a1d3-40c8 -a410-bfdb6d98c44c, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, closed=false, cpSpi=null, fail Spi=null, loadSpi=null, usage=1, fullSup=false, subjId=75c692a5-a1d3-40c8-a410-bfdb6d98c44c, mapFut= IgniteFuture [orig=GridFutureAdapter [resFlag=0, res=null, startTime=1428419484904, endTime=0, lsnr= null, state=INIT]]], jobId=d95de649c41-77f2a613-7845-434b-bebf-d2e7acc3b877]]] class org.apache.ignite.compute.ComputeUserUndeclaredException: Failed to execute job due to unexpec ted runtime exception [jobId=d95de649c41-77f2a613-7845-434b-bebf-d2e7acc3b877, ses=GridJobSessionImp l [ses=GridTaskSessionImpl [taskName=visor-cstop-task, dep=LocalDeployment [super=GridDeployment [ts =1428419255152, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, clsLdrId=07b1c649c 41-77f2a613-7845-434b-bebf-d2e7acc3b877, userVer=0, loc=true, sampleClsName=java.lang.String, pendin gUndeploy=false, undeployed=false, usage=0]], taskClsName=org.apache.ignite.internal.visor.cache.Vis orCacheStopTask, sesId=c95de649c41-75c692a5-a1d3-40c8-a410-bfdb6d98c44c, startTime=1428419484904, en dTime=9223372036854775807, taskNodeId=75c692a5-a1d3-40c8-a410-bfdb6d98c44c, clsLdr=sun.misc.Launcher $AppClassLoader@18b4aac2, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=fal se, subjId=75c692a5-a1d3-40c8-a410-bfdb6d98c44c, mapFut=IgniteFuture [orig=GridFutureAdapter [resFla g=0, res=null, startTime=1428419484904, endTime=0, lsnr=null, state=INIT]]], jobId=d95de649c41-77f2a 613-7845-434b-bebf-d2e7acc3b877]] at org.apache.ignite.internal.processors.job.GridJobWorker.handleThrowable(GridJobWorker.jav a:573) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:520) at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:423) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:107) at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJ obProcessor.java:1052) at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage (GridJobProcessor.java:1714) at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(Gr idIoManager.java:664) at org.apache.ignite.internal.managers.communication.GridIoManager.access$1500(GridIoManager .java:57) at org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java: 627) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Cache is not started: null at org.apache.ignite.internal.processors.cache.GridCacheProcessor.publicJCache(GridCacheProc essor.java:2330) at org.apache.ignite.internal.IgniteKernal.cache(IgniteKernal.java:2246) at org.apache.ignite.internal.visor.cache.VisorCacheStopTask$VisorCacheStopJob.run(VisorCach eStopTask.java:57) at org.apache.ignite.internal.visor.cache.VisorCacheStopTask$VisorCacheStopJob.run(VisorCach eStopTask.java:41) at org.apache.ignite.internal.visor.VisorJob.execute(VisorJob.java:67) at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:478) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6107) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:472) ... 10 more (wrn) <visor>: Cache is not started: null (wrn) <visor>: Type 'help cache' to see how to use this command. visor>
We should print out proper error message (cache not found) instead the exception above