Hello guys,
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>