Hello,

So after some testing with the DefaultTicketRegistryCleaner on CAS 5.1.9 with 
JPA ticket registry we have had to disable the DefaultTicketRegistryCleaner 
because it would take long to remove tickets from the Oracle Database.  We 
noticed that it would take some time to attempt a cleanup and when it would 
finally attempt to commit the transactions we would sometimes encounter the 
error below:


ERROR [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Unable 
to find org.apereo.cas.ticket.TicketGrantingTicketImpl with id TGT...


which would cause the entire transaction to roll back.  We tried having the 
cleanup process run only on 1 server but we would still see the same issues. 
This would in turn cause the tickets to accumulate and when the next cleanup 
would occur we would see even more slowness which would then affect the user 
logins.  We disabled the DefaultTicketRegistryCleaner and setup some external 
scripts and have not encountered any issues with ticket cleanup during our load 
testing.


Has the manner in which DefaultTicketRegistryCleaner is performed changed from 
version 3.6 to 5.1.9?  When we were running CAS 3.6 we did not have any issues 
with the DefaultTicketRegistryCleaner.


Thanks!



___________________
Juan Quintanilla
[email protected]<mailto:[email protected]>


________________________________
From: Juan Quintanilla
Sent: Tuesday, March 19, 2019 11:51 AM
To: [email protected]
Subject: CAS 5.1.9 DefaultTicketRegistryCleaner fails when TGT not found


Hello,


We are running 2 CAS 5.1.9 instances with ORacle 12 for the JPA ticket registry 
and we seeing the following error in the logs:


ERROR [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Unable 
to find org.apereo.cas.ticket.TicketGrantingTicketImpl with id TGT


The ticket mentioned in the logs belongs to the 2nd webserver and the cleanup 
process seems to be only running on the 1st webserver every 30 minutes even 
though it configured on both.  It never goes to the second webserver. The 
problem we run into is that because the cleanup process fails to find the 
ticket everything is rolled back and no ticket is removed.  From what we can 
find the issue occurs when the TGT is removed from the 2nd server because of a 
user initiated logout at the same time that the 1st server initiates the 
cleanup process.


Has anyone encountered something similar is there maybe a workaround to this so 
that tickets are cleaned up. Below is the configuration we have for the Ticket 
Registry and Cleanup Process:


cas.ticket.registry.jpa.ticketLockType=NONE
cas.ticket.registry.jpa.jpaLockingTimeout=3600

#cas.ticket.registry.jpa.healthQuery=select 1
cas.ticket.registry.jpa.isolateInternalQueries=false
cas.ticket.registry.jpa.url=xxxxxxxxx
cas.ticket.registry.jpa.failFast=true
cas.ticket.registry.jpa.dialect=org.hibernate.dialect.Oracle12cDialect
cas.ticket.registry.jpa.leakThreshold=10
cas.ticket.registry.jpa.jpaLockingTgtEnabled=false
cas.ticket.registry.jpa.batchSize=10
#cas.ticket.registry.jpa.defaultCatalog=
#cas.ticket.registry.jpa.defaultSchema=
cas.ticket.registry.jpa.user=xxxxxxxxxx
cas.ticket.registry.jpa.ddlAuto=update
cas.ticket.registry.jpa.password=xxxxxxxxxxx
cas.ticket.registry.jpa.autocommit=false
cas.ticket.registry.jpa.driverClass=oracle.jdbc.OracleDriver
cas.ticket.registry.jpa.idleTimeout=5000
#cas.ticket.registry.jpa.dataSourceName=
cas.ticket.registry.jpa.dataSourceProxy=false
cas.ticket.registry.jpa.pool.suspension=false




# cas.ticket.registry.cleaner.appId=cas-ticket-registry-cleaner
# cas.ticket.registry.cleaner.startDelay=10000
cas.ticket.registry.cleaner.repeatInterval=1800000
# cas.ticket.registry.cleaner.enabled=true


___________________
Juan Quintanilla
[email protected]<mailto:[email protected]>

-- 
- 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/SN6PR05MB51824F9C4F1F21E74F35A05D86590%40SN6PR05MB5182.namprd05.prod.outlook.com.

Reply via email to