Hello

  Have JPA + Mysql and ticket registry/cleanup. It works fine in cas 6.1.7.
  Trying to get ready for cas 6.2.x and looks like Ticket registry cleaner 
fails to remove tickets + throws exception (" Transaction silently rolled 
back because it has been marked as rollback-only ")

  If anyone had this made it work, appreciate any guidance including if 
there were any changes to JpaTicketRegistry.java or such.

  Tried on cas 6.2.x for all versions 1-5 with overlay method.   
  Also not certain if there was any relevance to 
https://github.com/apereo/cas/pull/4884 yet could not find any reference on 
commits to 6.2.x. (Error message is similar)

# sample values that work fine on v6.1.7.x
cas.ticket.registry.cleaner.schedule.startDelay=10000
cas.ticket.registry.cleaner.schedule.repeatInterval=60000
# if multiple nodes, only one has it enabled
cas.ticket.registry.cleaner.schedule.enabled=true
# Tried others as well, NONE was used for many years. 
#  READ,WRITE,OPTIMISTIC,OPTIMISTIC_FORCE_INCREMENT,PESSIMISTIC_READ, 
PESSIMISTIC_WRITE,PESSIMISTIC_FORCE_INCREMENT,NONE.
cas.ticket.registry.jpa.ticketLockType=NONE
cas.ticket.registry.jpa.jpaLockingTimeout=3600
cas.ticket.registry.jpa.autocommit=false
cas.ticket.registry.jpa.idleTimeout=5000

# Error dump (ticket is not deleted, exception thrown)
^[[32m2020-11-05 14:35:14,200 INFO 
[org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <[1] 
expired tickets removed.>^[[m
^[[36m2020-11-05 14:35:14,200 DEBUG 
[org.apereo.cas.ticket.registry.support.JpaLockingStrategy] - <Releasing 
[cas-ticket-registry-cleaner] lock held by [maaro].>^[[m
^[[36m2020-11-05 14:35:14,201 DEBUG 
[org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Finished 
ticket cleanup.>^[[m
^[[1;31m2020-11-05 14:35:14,219 ERROR 
[org.apereo.cas.config.CasCoreTicketsSchedulingConfiguration] - 
<Transaction silently rolled back because it has been marked as 
rollback-only>^[[m
org.springframework.transaction.UnexpectedRollbackException: Transaction 
silently rolled back because it has been marked as rollback-only
        at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:752)
 
~[spring-tx-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
 
~[spring-tx-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:631)
 
~[spring-tx-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:385)
 
~[spring-tx-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
 
~[spring-tx-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 
~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 
~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
 
~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner$$EnhancerBySpringCGLIB$$e7722c2c.clean(<generated>)
 
~[cas-server-core-tickets-api-6.2.5.jar:6.2.5]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[?:?]
        at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 
~[?:?]
        at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at 
org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) 
~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:499)
 
~[spring-cloud-context-2.2.2.RELEASE.jar:2.2.2.RELEASE]
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 
~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
 
~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at com.sun.proxy.$Proxy256.clean(Unknown Source) ~[?:?]
        at 
org.apereo.cas.config.CasCoreTicketsSchedulingConfiguration$TicketRegistryCleanerScheduler.run(CasCoreTicketsSchedulingConfiguration.java:101)
 
~[cas-server-core-tickets-6.2.5.jar:6.2.5]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[?:?]
        at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 
~[?:?]
        at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at 
org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
 
~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
 
~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 
~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) 
~[?:?]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
 
~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]



Many thanks for any hints how to pursue this.

  

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/73a0182a-81b5-4230-9955-dc503e69c478n%40apereo.org.

Reply via email to