Hi Rishi, I'm wondering if this has to do with trying to stop an instance that was no longer being managed by the Workflow Manager. The WM has a map that contains an id->Worker table of the current instances that are processing. Stopping an instance only works if the worker map contains the ID of the workflow instance that you are trying to stop.
Often the behavior below happens if e.g., you restarted the WM a few times after having some stuck workflows and then are trying to clear out those old records in your processing list by calling stopInst, yet the WM barks at you b/c it doesn't know anything about that ID anymore. I've often thought that a way around this would be to *also* check the instance repository, for an instance that is still running (according to its last recorded persistence) and if so, grab it, instantiate a dummy object, mark it as "done", and then re-persist the instance as stopped. A JIRA issue + a patch that implements that strategy would be most welcome (by anyone on this thread ^_^ or list ^_^). Cheers, Chris On Oct 12, 2011, at 4:41 PM, Verma, Rishi (388J) wrote: > Hi all - > > I'm trying to stop one of my PGE workflows using the wmgr-client tool and the > "--stopWorkflowinst" argument. > > I'm repeatedly getting a NullPointerException after trying to stop a running > workflow. > > I believe I am using the '--stopWorkflowInst' argument correctly. Has anyone > had luck with shutting down workflow PGE instances using this method? > > Thanks! > rishi > > ----- > $ ./wmgr-client --url http://localhost:9001 --operation --getWorkflowInsts > ... > Instance: [id=ed798a3d-f075-11e0-bc2c-21311056edb2, status=CRAWLING, > currentTask=urn:oodt:ProteomeLinux, > workflow=ProteomeLinuxWorkflow,wallClockTime=8524.3347,currentTaskWallClockTime=3.2414] > ... > > $ ./wmgr-client --url http://localhost:9001 --operation --stopWorkflowInst > --id ed798a3d-f075-11e0-bc2c-21311056edb2 > org.apache.xmlrpc.XmlRpcException: java.lang.Exception: > java.lang.NullPointerException > at > org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(XmlRpcClientResponseProcessor.java:104) > at > org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlRpcClientResponseProcessor.java:71) > at > org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:73) > at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) > at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) > at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) > at > org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient.stopWorkflowInstance(XmlRpcWorkflowManagerClient.java:341) > at > org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient.main(XmlRpcWorkflowManagerClient.java:907) > Exception in thread "main" java.lang.RuntimeException: java.lang.Exception: > java.lang.NullPointerException > at > org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient.main(XmlRpcWorkflowManagerClient.java:913) > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: [email protected] WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
