AnsweredAssumed Answered

AVM Deployment Attempt Cleaner

Question asked by lynnders on May 2, 2012
Latest reply on May 2, 2012 by lynnders
I enabled the AVM Deployment Attempt Cleaner. I've configured the deployment-attempt-cleaner-context.xml
to delete reports that are older than 100 days.

This task has started to fail because one of the nodes is locked. The whole job fails and will no longer delete any reports.

Error:

11:20:00,017 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Finding old deploymentattempt nodes using query: @wca\:deployattempttime:[0001\-01\-01T00:00:00 TO 2012\-3\-13T00:00:00]
11:20:00,217 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Deleting 344 old deployment attempts
11:20:00,394 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Deleted deployment attempt: workspace://SpacesStore/a5233a86-a107-4992-b100-0bf8eb47be44
11:20:00,510 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Deleted deployment attempt: workspace://SpacesStore/e7a0615c-a1bd-42bd-a1fb-2b65be285ab5


11:20:05,238 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Deleted deployment attempt: workspace://SpacesStore/6793ca78-455f-4a2a-9517-b1dadfcfa318
11:20:05,336 User:admin DEBUG [repo.avm.AVMDeploymentAttemptCleaner] Deleted deployment attempt: workspace://SpacesStore/b2257c1d-6d37-4627-8eb7-e0d8755bec8d
11:20:05,473  ERROR [quartz.core.JobRunShell] Job DEFAULT.avmDeploymentAttemptCleanerDetail threw an unhandled Exception:
org.alfresco.service.cmr.lock.NodeLockedException: 04020012 Can not perform operation since the node (id:0124f126-27ae-4e62-b8d6-79b01850ff7e) is locked.
        at org.alfresco.repo.lock.LockServiceImpl.checkForLock(LockServiceImpl.java:502)
        at org.alfresco.repo.lock.LockServiceImpl.beforeDeleteNode(LockServiceImpl.java:545)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:179)
        at $Proxy19.beforeDeleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor630.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.PolicyFactory$MultiHandler.invoke(PolicyFactory.java:306)
        at org.alfresco.repo.policy.$Proxy193.beforeDeleteNode(Unknown Source)
        at org.alfresco.repo.node.AbstractNodeServiceImpl.invokeBeforeDeleteNode(AbstractNodeServiceImpl.java:357)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.deletePrimaryChildren(DbNodeServiceImpl.java:851)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.deleteNode(DbNodeServiceImpl.java:792)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
        at $Proxy11.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:306)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:306)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:274)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:274)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.cleanAttempts(AVMDeploymentAttemptCleaner.java:158)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.access$000(AVMDeploymentAttemptCleaner.java:49)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1$1.execute(AVMDeploymentAttemptCleaner.java:105)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1$1.execute(AVMDeploymentAttemptCleaner.java:102)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:234)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1.doWork(AVMDeploymentAttemptCleaner.java:109)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1.doWork(AVMDeploymentAttemptCleaner.java:98)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.execute(AVMDeploymentAttemptCleaner.java:114)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleanerJob.execute(AVMDeploymentAttemptCleanerJob.java:60)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
11:20:05,474  ERROR [quartz.core.ErrorLogger] Job (DEFAULT.avmDeploymentAttemptCleanerDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.service.cmr.lock.NodeLockedException: 04020012 Can not perform operation since the node (id:0124f126-27ae-4e62-b8d6-79b01850ff7e) is locked.]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.alfresco.service.cmr.lock.NodeLockedException: 04020012 Can not perform operation since the node (id:0124f126-27ae-4e62-b8d6-79b01850ff7e) is locked.
        at org.alfresco.repo.lock.LockServiceImpl.checkForLock(LockServiceImpl.java:502)
        at org.alfresco.repo.lock.LockServiceImpl.beforeDeleteNode(LockServiceImpl.java:545)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:179)
        at $Proxy19.beforeDeleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor630.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.PolicyFactory$MultiHandler.invoke(PolicyFactory.java:306)
        at org.alfresco.repo.policy.$Proxy193.beforeDeleteNode(Unknown Source)
        at org.alfresco.repo.node.AbstractNodeServiceImpl.invokeBeforeDeleteNode(AbstractNodeServiceImpl.java:357)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.deletePrimaryChildren(DbNodeServiceImpl.java:851)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.deleteNode(DbNodeServiceImpl.java:792)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
        at $Proxy11.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:306)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:306)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:274)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:274)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy10.deleteNode(Unknown Source)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.cleanAttempts(AVMDeploymentAttemptCleaner.java:158)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.access$000(AVMDeploymentAttemptCleaner.java:49)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1$1.execute(AVMDeploymentAttemptCleaner.java:105)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1$1.execute(AVMDeploymentAttemptCleaner.java:102)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:234)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1.doWork(AVMDeploymentAttemptCleaner.java:109)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner$1.doWork(AVMDeploymentAttemptCleaner.java:98)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleaner.execute(AVMDeploymentAttemptCleaner.java:114)
        at org.alfresco.repo.avm.AVMDeploymentAttemptCleanerJob.execute(AVMDeploymentAttemptCleanerJob.java:60)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        … 1 more

The locked node is owned by our 'editorial3' user. This user became corrupt and we couldn't log on with their credentials, so I deleted the user. Even though I can no longer see them in the users section - I'm unable to add an new editorial3 user so they're not completely deleted. But this post isn't about the corrupt user.

How can I remove the lock so that the job can delete this node?

I've queried the node browser with the noderef that is erroring:
workspace://SpacesStore/0124f126-27ae-4e62-b8d6-79b01850ff7e

Here are some node details:

{http://www.alfresco.org/model/wcmappmodel/1.0}deployversion   11851
{http://www.alfresco.org/model/wcmappmodel/1.0}deployservertargetused   default
{http://www.alfresco.org/model/wcmappmodel/1.0}deploysuccessful   true
{http://www.alfresco.org/model/wcmappmodel/1.0}deployserverusernameused   admin
{http://www.alfresco.org/model/content/1.0}expiryDate   –null–
{http://www.alfresco.org/model/system/1.0}node-uuid   0124f126-27ae-4e62-b8d6-79b01850ff7e
{http://www.alfresco.org/model/content/1.0}creator   editorial3
{http://www.alfresco.org/model/content/1.0}modifier   editorial3
{http://www.alfresco.org/model/wcmappmodel/1.0}deployendtime   Mon Jan 23 14:45:02 GMT 2012
{http://www.alfresco.org/model/content/1.0}lockOwner   editorial3
{http://www.alfresco.org/model/content/1.0}content   contentUrl=store://2012/1/23/14/45/08c2d552-aabd-439e-ad02-40ea107d8f35.bin|mimetype=text/plain|size=2010|encoding=utf-8|locale=en_GB_
{http://www.alfresco.org/model/wcmappmodel/1.0}deployexcludesused   .*web\.xml$,.*loginStatus\.jsp$,.*taglibs\.jsp$
{http://www.alfresco.org/model/wcmappmodel/1.0}deploystarttime   Mon Jan 23 14:44:45 GMT 2012
{http://www.alfresco.org/model/content/1.0}modified   Thu Jan 26 12:36:41 GMT 2012
{http://www.alfresco.org/model/wcmappmodel/1.0}deployserverurlused   –null–
{http://www.alfresco.org/model/content/1.0}created   Mon Jan 23 14:45:02 GMT 2012
{http://www.alfresco.org/model/system/1.0}store-protocol   workspace
{http://www.alfresco.org/model/content/1.0}lockType   READ_ONLY_LOCK

Outcomes