Hi, The current ODE engine uses a marker file for deployed processes,so it will not happen when a node tries to deploy a process that is already known to the database, even it has changed. Then What is about this error with markAsDeployed(file) in DeploymentPoller class? Why doesn't it create a marker file successfully?
ERROR [DeploymentPoller] Error while creating file HelloWorld2-1.deployed ,deployment could be inconsistent On 11 May 2015 at 13:55, Sathwik B P <sathwik...@gmail.com> wrote: > I will explain this as race conditions between 2 deployment scanners > working on the same deployment unit. You will encounter undeterministic > behavior in this setup. > > The idea here is to make sure that only one ODE instance takes the > responsibility to deploy the process artifact. Inorder to come up with an > approach, you will have to understand the basic deployment process. > > I would suggest you to work on a single ODE instance first to understand > the deployment process. > > Will give a head start. > > ODE has 2 ways of deploying processes. > 1) Deployment Web Service > 2) Manual deployment - (refer: > > https://ode.apache.org/process-versioning.html#remote-deployment-vs-hand-made-deployment > ) > > Manual deployment is handled by a Deployment Poller thread scanning the > deployment directory ( > > https://github.com/apache/ode/blob/master/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java > ) > Every 3 seconds, it scans for any new deployment units and kicks of the > deployment process by invoking the ProcessStoreImpl. > > With Deployment Web Service, the Deployment poller is kept *on* *hold* > until the deployment completes as it extracts the process archive onto the > deployment directory. This is done to avoid the race conditions arising > from the DeploymentPoller. > > > regards, > sathwik > > On Sun, May 10, 2015 at 10:24 PM, sudharma subasinghe < > suba...@cse.mrt.ac.lk > > wrote: > > > Hi, > > > > I used same deploy directory for both ODE instances and deployed a > process > > while debugging the source code. while deploying HelloWorld2-1 in > Tomcat-1 > > the version is set to 2. I got an exception due to it. Following are the > > console output of each server. > > > > Tomcat-1 > > > > 21:49:42,201 WARN [ProcessStoreImpl] Database out of synch for DU > > HelloWorld2-1 > > 21:50:08,766 INFO [BpelServerImpl] Registered process { > > http://ode/bpel/unit-test}HelloWorld2-2. > > 21:50:41,617 WARN [DeploymentWebService] Invocation of operation deploy > > failed > > org.apache.ode.axis2.OdeFault: Error while creating file > > HelloWorld2-1.deployeddeployment failed > > at > > > > > org.apache.ode.axis2.service.DeploymentWebService$DeploymentMessageReceiver.invokeBusinessLogic(DeploymentWebService.java:185) > > at > > > > > org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) > > at > > > > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) > > at > > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > > at > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > > at > > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > > at > > > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > > at > > > > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) > > at > > > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > > at > > > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) > > at > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) > > at > > > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) > > at > > > > > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) > > at > > > > > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) > > at > > > > > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) > > at > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > > at > > > > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > > at java.lang.Thread.run(Thread.java:722) > > > > > > Tomcat-2 > > > > 21:52:31,561 ERROR [ProcessStoreImpl] Process { > > http://ode/bpel/unit-test}HelloWorld2-1 not found. > > 21:52:31,610 WARN [DeploymentWebService] Invocation of operation deploy > > failed > > org.apache.ode.bpel.iapi.ContextException: DbError > > at > > org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:636) > > at > > org.apache.ode.store.ProcessStoreImpl.setState(ProcessStoreImpl.java:435) > > at > > > > > org.apache.ode.store.ProcessStoreImpl.setRetiredPackage(ProcessStoreImpl.java:485) > > at > > > > > org.apache.ode.store.ProcessStoreImpl.retirePreviousPackageVersions(ProcessStoreImpl.java:349) > > at > > org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:225) > > at > > org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:172) > > at > > > > > org.apache.ode.axis2.service.DeploymentWebService$DeploymentMessageReceiver.invokeBusinessLogic(DeploymentWebService.java:181) > > at > > > > > org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) > > at > > > > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) > > at > > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > > at > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > > at > > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > > at > > > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > > at > > > > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) > > at > > > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > > at > > > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) > > at > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) > > at > > > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) > > at > > > > > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) > > at > > > > > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) > > at > > > > > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) > > at > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > > at > > > > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > > at java.lang.Thread.run(Thread.java:722) > > Caused by: java.util.concurrent.ExecutionException: > > org.apache.ode.bpel.iapi.ContextException: Process { > > http://ode/bpel/unit-test}HelloWorld2-1 not found. > > at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252) > > at java.util.concurrent.FutureTask.get(FutureTask.java:111) > > at > > org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:634) > > ... 32 more > > Caused by: org.apache.ode.bpel.iapi.ContextException: Process { > > http://ode/bpel/unit-test}HelloWorld2-1 not found. > > at > > org.apache.ode.store.ProcessStoreImpl$4.call(ProcessStoreImpl.java:448) > > at > > org.apache.ode.store.ProcessStoreImpl$4.call(ProcessStoreImpl.java:435) > > at > > > > > org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:809) > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > > at > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > > ... 1 more > > > > But the deployment directory had HelloWorld2-1 folder and > > HelloWorld2-1.deployed file. I think this is because of setting the > version > > to 2. Can you explain this? > > > > > > > > On 10 May 2015 at 10:15, Sathwik B P <sathwik...@gmail.com> wrote: > > > > > Watch out for the race conditions with the two DeploymentPoller one on > > each > > > ODE instance working on the same deploy directory. > > > > > > > > > On Sun, May 10, 2015 at 9:44 AM, sudharma subasinghe < > > > suba...@cse.mrt.ac.lk> > > > wrote: > > > > > > > Hi, > > > > > > > > I used separate deploy directories for both ODE instances. I will > > > configure > > > > the path to share the same directory. > > > > > > > > Thank you. > > > > > > > > On 9 May 2015 at 23:47, Tammo van Lessen <tvanles...@gmail.com> > wrote: > > > > > > > > > Hi Sudharma, > > > > > > > > > > did both ODE instances operate on the same deploy directory? Or do > > they > > > > > have their own? The basic assumption is that both share the same, > > > > > synchronized data, thus I'd recommend to either use a symlink or > > > > configure > > > > > the path by setting the "ode-axis2.deploy.dir" property in > > > > > WEB-INF/conf/ode-axis2.properties. > > > > > > > > > > Best, > > > > > Tammo > > > > > > > > > > On Tue, May 5, 2015 at 5:18 PM, sudharma subasinghe < > > > > suba...@cse.mrt.ac.lk > > > > > > > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I checked the behavior of ODE using two tomcat servers when > > deploying > > > > > same > > > > > > HelloWorld2 sample. Following are the things I could observe. > > > > > > > > > > > > > > > > > > - > > > > > > > > > > > > deployed HelloWorld2-1 in Tomcat-1 server → Active state > > > > > > - > > > > > > > > > > > > deployed HelloWorld2-2 in Tomcat-2 server → Active state > > > > > > - > > > > > > > > > > > > deployed HelloWorld2-3 in Tomcat-1 server → HelloWorld2-1 > > Retired > > > > from > > > > > > Active state > > > > > > - > > > > > > > > > > > > undeployed HelloWorld2-3 → but still in the database in Active > > > state > > > > > > - > > > > > > > > > > > > deployed HelloWorld2-4 in Tomcat-2 server → HelloWorld2-2 > > Retired > > > > from > > > > > > Active state > > > > > > - > > > > > > > > > > > > All these details are shared by the two ode engines. > > > > > > > > > > > > 1) I can't undeploy a process through the browser. So I removed > the > > > > whole > > > > > > folder and .deployed file. But in the shared database that > process > > is > > > > > still > > > > > > in the Active state. > > > > > > > > > > > > 2) Though HelloWorld2-1, is deployed in Tomcat-1 server and > > > > > HelloWorld2-2, > > > > > > HelloWorld2-4 are deployed in Tomcat-2 server all the deployed > > > details > > > > > are > > > > > > shown in both browsers. > > > > > > > > > > > > Can you explain reasons for 1) and 2) ? > > > > > > > > > > > > Thank you > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Tammo van Lessen - http://www.taval.de > > > > > > > > > > > > > > >