CAS 5.3.8 EhCache & DiskStorage Problem

29 views
Skip to first unread message

Artur Stöcklin

unread,
Sep 14, 2020, 6:16:12 AM9/14/20
to CAS Community
Hi Community

Currently we use the CAS in version 5.3.8. There are two instances which share tickets through the ehcache (version 2.10.5). The CAS gets his property data from the cas config server. The problem we are facing applies to the EhCache disk storage.

Unfortunately the tickets are not saved to disk although disk overflow is configured. I have spent some time with debugging but currently I am not able to find the problem.
The ehcache ticket registry works well in memory but as soon as the memory max ticket size is reached the tickets will be deleted from memory. the configured storage on disk stays empty without any cache file.

here is the ehcache configuration from the cas config server:

## CAS EhCache Parameters
cas.ticket.registry.ehcache.replicateUpdatesViaCopy=true
#cas.ticket.registry.ehcache.cacheManagerName=ehCacheTicketRegistryCache
cas.ticket.registry.ehcache.cacheManagerName=ehcacheTicketCacheManager
cas.ticket.registry.ehcache.replicatePuts=true
cas.ticket.registry.ehcache.replicateUpdates=true
cas.ticket.registry.ehcache.memoryStoreEvictionPolicy=LRU
cas.ticket.registry.ehcache.configLocation=classpath:/xy/fakedomain/config/${environment.target}/${xy.fakedomain.node.id}/ehcache-replicated.xml
cas.ticket.registry.ehcache.maximumBatchSize=100
cas.ticket.registry.ehcache.shared=true
cas.ticket.registry.ehcache.replicationInterval=10000
#cas.ticket.registry.ehcache.cacheTimeToLive=15724800
cas.ticket.registry.ehcache.diskExpiryThreadIntervalSeconds=240
cas.ticket.registry.ehcache.replicateRemovals=true
cas.ticket.registry.ehcache.maxChunkSize=5000000
cas.ticket.registry.ehcache.maxElementsOnDisk=100000
#cas.ticket.registry.ehcache.maxElementsInCache=5
cas.ticket.registry.ehcache.maxElementsInMemory=10000
cas.ticket.registry.ehcache.eternal=false
cas.ticket.registry.ehcache.loaderAsync=true
cas.ticket.registry.ehcache.replicatePutsViaCopy=true
#cas.ticket.registry.ehcache.cacheTimeToIdle=604800
cas.ticket.registry.ehcache.persistence=DISTRIBUTED
cas.ticket.registry.ehcache.synchronousWrites=false

ehcache-replicated.xml (one of both files)
<ehcache name="ehcacheTicketCacheManager"
         updateCheck="false"
         xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">

    <diskStore path="/path/to/diskstore/"/>

   
    <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"

    <cacheManagerPeerListenerFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
            properties="port=41001,remoteObjectPort=41002,socketTimeoutMillis=2000"/>

</ehcache>


Logfile 1 - set to log net.sf.ehcache
attached as file ehcache.log

Logfile 2 - set to log 
org.apereo.cas.config.EhcacheTicketRegistryConfiguration
org.apereo.cas.config.EhcacheTicketRegistryTicketCatalogConfiguration
org.apereo.cas.ticket.registry
attached as file ehcacheCas.log

Any help would be very appreciated
Many thanks

ehcacheCas.log
ehcache.log
Reply all
Reply to author
Forward
0 new messages