Ehcache resource conflict

30 views
Skip to first unread message

newbee

unread,
Aug 17, 2018, 5:54:08 AM8/17/18
to CAS Community
Hello guys,

I am trying to use EhCache Ticket Registry as a storage. I have followed the steps provided in this document. https://apereo.github.io/cas/5.2.x/installation/Ehcache-Ticket-Registry.html

I had to change the name of the xml file to ehcache.xml instead of ehcache-replicated.xml as mentioned in the documentation.

I am getting below error while CAS starts up. Its a warning message. Shall I be concerned?


2018-08-13 11:09:58,706 WARN [net.sf.ehcache.CacheManager] - <Creating a new instance of CacheManager with a CacheManagerPeerListener which has a conflict on a resource that must be unique.
The resource is RMI listener port: 41001.
Attempting automatic resolution. The source of the configuration was DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ].
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.>
2018-08-13 11:09:58,706 WARN [net.sf.ehcache.distribution.RMICacheManagerPeerListener] - <Resolving RMI port conflict by automatically using a free TCP/IP port to listen on: 53897>


Please point anything that I am not doing right here.

My application.properties have these settings.

##
# Ehcache Ticket Registry
#
cas
.ticket.registry.ehcache.configLocation=classpath:/ehcache.xml

The ehcache.xml file looks like below

<ehcache name="ehCacheTicketRegistryCache"
 
updateCheck="false"
 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">

 
<diskStore path="java.io.tmpdir/cas"/>

 
<!-- Automatic Peer Discovery
 <cacheManagerPeerProviderFactory
 class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
 properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=32"
 propertySeparator="," />
 -->


 
<!-- Manual Peer Discovery -->
 
<cacheManagerPeerProviderFactory
 
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
 
properties="peerDiscovery=manual,rmiUrls=//localhost:41001/org.apereo.cas.ticket.TicketCache" />
 
<cacheManagerPeerListenerFactory
 
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
 
properties="port=41001,remoteObjectPort=41002" />
</ehcache>

Reply all
Reply to author
Forward
0 new messages