I've figured out my problem.  It was answered in an earlier thread by
with the subject..

re:[cas-user] Redoing CAS - looking at LdapServiceRegistryDao and ehcache

The issue was that the "shared" property needs to be set to true in..

    <bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation"
value="WEB-INF/ehcache-replicated.xml" />
        <property name="shared" value="true" />
        <property name="cacheManagerName"
value="ticketRegistryCacheManager" />
    </bean>

Once that was done, everything started working.

Between yesterday and today, I tried many changes.  I can confirm that I
got the same results from openjdk-1.6, openjdk-1.7, as well as Tomcat6
and Tomcat7.  I kept moving backwards in revisions and I'm now using
Sun/Oracle JDK 1.6 on Tomcat6.  I'd like to go back to the openjdk
packages on Tomcat7 (for ease of updates).  Authentication and
everything else was working with the different java/tomcat versions, it
was just the cache replication that was throwing the error.  So I'm
thinking everything may be compatible between openjdk and sun/oracle jdk.

Hopefully, this will be helpful to others.

Thanks,

Pat

On 1/4/13 10:38 PM, Patrick Hennessy wrote:
> Greetings,
> 
> I've been using memcache/repcache for our CAS servers, but wanted to try
> out ehcache since it looked like a better alternative.  If I'm going
> down the wrong path, please let me know.  :)
> 
> I followed the directions on
> https://wiki.jasig.org/display/CASUM/EhcacheTicketRegistry and got
> something working, but it doesn't seem to replicate.  After a log in on
> one node, I get the following error..
> 
> 2013-01-04 22:11:54,904 ERROR
> [net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator] -
> <Exception on flushing of replication queue: null. Continuing...>
> java.lang.NullPointerException
>       at
> net.sf.ehcache.distribution.RMISynchronousCacheReplicator.listRemoteCachePeers(RMISynchronousCacheReplicator.java:335)
>       at
> net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.writeReplicationQueue(RMIAsynchronousCacheReplicator.java:312)
>       at
> net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:127)
>       at
> net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$000(RMIAsynchronousCacheReplicator.java:58)
>       at
> net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:389)
> 
> I'm using the ehcache-replicated.xml file from..
> 
> https://github.com/Jasig/cas/blob/master/cas-server-integration-ehcache/src/test/resources/ehcache-replicated.xml
> 
> I was using tcpdump to watch the traffic between nodes when logging in.
>  I only saw traffic when I removed "remoteObjectPort=41002" from the
> Listener section.  But even then I wasn't able to validate a service
> ticket from the other server after logging in.
> 
> Something else that seemed odd was that I only saw one file in
> /tmp/tomcat7-tomcat7-tmp..
> 
> org%002ejasig%002ecas%002eticket%002e%0054icket%0047ranting%0054icket.data
> 
> I would've expected to find a data file for the service tickets as well.
>  That file does grow from a zero size to a couple bytes after logging
> in.  I imagine that file would grow on the other node as tickets are
> replicated, right?
> 
> I have checked what I believe are the obvious problems after reading the
> mailing list.  All traffic between servers is allowed and both servers
> have ntp running.
> 
> Does anyone else familiar with ehcache have some pointers?  I'm running
> CAS 3.5.1 with openjdk-7-jdk and Tomcat 7 on Ubuntu 12.04.  I can reply
> with some of the config files or my pom.xml if needed.
> 
> Thanks,
> 
> Pat
> 


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to