Maybe it is just me, but are there spaces before the cookieDomain
values?  I don't know if this would affect things or not, but try that.
As far as setting up CAS without DNS, I cannot say how that would occur;
my apologies.

 

Hope that helps,

 

Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

[EMAIL PROTECTED]

(office) 225.578.3737

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of David Pham
Sent: Thursday, September 13, 2007 10:09 AM
To: Yale CAS mailing list
Subject: Re: cas clustering with jbossCacheTicketRegistry

 

Andrew,
   Setting the domain property is not something I am confident about
mainly because I do not use a DNS server (trying to avoid having to use
one).  Instead I've taken the route of just adding some alias in my
/etc/hosts file but I'm not certain if I am setting it up right because
I don't have strong knowledge with DNS. 

Here is my cas-servlet.xml configuration,

        <bean id="warnCookieGenerator"
class="org.springframework.web.util.CookieGenerator">
                <property name="cookieDomain" value=" scit.com" />
                <property name="cookieSecure" value="true" />
                <property name="cookieMaxAge" value="-1" /> 
                <property name="cookieName" value="CASPRIVACY" />
                <property name="cookiePath" value="/cas" />
        </bean>
 

        <bean id="ticketGrantingTicketCookieGenerator"
class="org.springframework.web.util.CookieGenerator">
                <property name="cookieDomain" value=" scit.com
<http://scit.com> " />
                <property name="cookieSecure" value="true" />
                <property name="cookieMaxAge" value="-1" />
                <property name="cookieName" value="CASTGC" /> 
                <property name="cookiePath" value="/cas" />
        </bean>


This is my hosts file content for the first CAS.  Basically I have CAS1
& CAS2 servers 
(192.168.1.111, 192.168.1.112 respectively) in the cluster so my train
of thought is if I just 
include a host entry for CAS2 then that should sufficient for CAS1 to
see its peer.  But maybe 
I am wrong about this.

# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1      localdomain   CAS1
127.0.0.1        localhost.localdomain   CAS1
192.168.1.112   scit.com        CAS2


Regards, David



On 9/13/07, Andrew R Feller <[EMAIL PROTECTED]> wrote:

David,

 

Did you configure your Ticket Granting Ticket cookie to be in a domain
that both servers can see it?  Open your cas-servlet.xml file and look
for the ticketGrantingTicketCookieGenerator bean and make sure the
domain is specified like so:

 

<bean

id="ticketGrantingTicketCookieGenerator"

class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator" 

p:cookieDomain=" example.edu <http://example.edu> "

p:cookieSecure="true"

p:cookieMaxAge="-1"

p:cookieName="CASTGC"

p:cookiePath="/cas" />

 

HTH, 

 

Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

[EMAIL PROTECTED] 

(office) 225.578.3737

________________________________

From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] On Behalf Of David Pham
Sent: Thursday, September 13, 2007 9:38 AM
To: Yale CAS mailing list
Subject: Re: cas clustering with jbossCacheTicketRegistry

 

Hi Lucas,
   I'm actually using cas-server 3.0.7+ tomcat 5.5 too.  I followed the
cas clustering guide
like the bible and I believe I have all components (e.g. ticket
uniqueness, tomcat session replication, 
& jboss ticket registry) implemented correctly.  Is there info in the
catalina log that indicate 
my CASes are sharing session info?  

Here is an example of what I'm seeing in my logs when Tomcat loads up.
I believe this indicates
that the sessions are replicated,

Sep 12, 2007 11:52:13 PM
org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
WARNING: Manager [/cas], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.112:4001,c
atalina,192.168.1.112,4001, alive=100159]. This operation will timeout
if no session state has been received within 60 seconds. 
Sep 12, 2007 11:52:13 PM
org.apache.catalina.cluster.session.DeltaManager waitForSendAllSessions
INFO: Manager [/cas]; session state send at 9/12/07 11:52 PM received in
279 ms.


Regards, David

On 9/13/07, Lucas Rockwell <[EMAIL PROTECTED]> wrote:

Hi David,

(Keep in mind I have not does this with 3.1 yet, so this is for 3.0.7
[it may be different for 3.1].)

The session information about a logged in user is not replicated
using the JBossCacheTicketRegistry -- this is for the service ticket 
registry. The problem you are experiencing is because the session
information from CAS1 is not being replicated to CAS2. Have you
implemented the Tomcat session replication part? If you are using
Tomcat, see the section labeled "Tomcat Session Replication" in the 
clustering documentation.

-lucas

On Sep 12, 2007, at 8:59 PM, David Pham wrote:

> Thanks for the quick response Scott, you were right, the errors
> were caused by a missing jar and not related to the CLASSPATH. 
>
> So now that my cluster of 2 CASes have loaded and assuming I have
> session replication + cas clustering implemented
> properly I did a quick test that does not seem to work.  Perhaps my
> understanding of how cas clustering is wrong because the cluster 
> does not appear to be sharing the ticket registry.
>
> Test scenario:
>       Load up CAS1
>       From client browser, access the casified application and get
> redirected to CAS1 login screen 
>       Authenticate and receive TGC from CAS1
>
>       Load up CAS2
>       Using the same browser window, access the casified app again
>       the load balancer redirects to CAS2 login screen 
>
>
> I should not have to reauthenticate with CAS2 if both CAS1 and 2
> shared session data correct?  However
> this is not the case as the client browser is not automatically
> redirected to the casified app. 
>
> Regards, David
>
>
> On 9/12/07, Scott Battaglia <[EMAIL PROTECTED]> wrote: Its
> probably not a CLASSPATH variable issue as much as missing a 
> required jar (in this case the JBossCache jar).  If you are using
> the CAS 3.1 distribution, you should be able to declare the cas-
> server-integration-jboss (or whatever its called) as a dependency 
> of the webapp project and when you package the webapp project it
> should include all of the necessary jars.
>
> -Scott
>
> On 9/12/07, David Pham < [EMAIL PROTECTED]> wrote:
> Hi All,
> Can anyone tell me what the CLASSPATH should be set to in order to
> implement jboss?  Unfortunately I am getting NoClassDefFoundError
> exceptions
> despite following the instructions from this guide http://www.ja-
> sig.org/wiki/display/CASUM/Clustering+CAS.
>
> Here is an error example,
>
> The Spring ContextLoaderListener we wrap threw on contextInitialized. 
> But for our having caught this error, the web application context
> would not have initialized.>
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'centralAuthenticationService' defined in 
> ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot
> resolve reference to bean 'ticketRegistry' while
> setting bean property 'ticketRegistry'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'ticketRegistry' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Instantiation of bean
> failed; nested exception is java.lang.NoClassDefFoundError: org/
> jboss/cache/CacheException
> Caused by:
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'ticketRegistry' defined in ServletContext 
> resource [/WEB-INF/applicationContext.xml]: Instantiation of bean
> failed; nested exception is java.lang.NoClassDefFoundError: org/
> jboss/cache/CacheException
> Caused by:
> java.lang.NoClassDefFoundError : org/jboss/cache/CacheException
>         at java.lang.Class.getDeclaredConstructors0(Native Method)
>         at java.lang.Class.privateGetDeclaredConstructors
> (Class.java:2357)
>         at java.lang.Class.getConstructor0 (Class.java:2671)
>         at java.lang.Class.getDeclaredConstructor(Class.java:1953)
>         at org.springframework.beans.BeanUtils.instantiateClass
> (BeanUtils.java:60)
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy
.
> instantiate(SimpleInstantiationStrategy.java:45)
>
>
> Regards, David
>
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
>
> --
> -Scott Battaglia
>
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
> _______________________________________________
> Yale CAS mailing list 
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas

_______________________________________________ 
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

 


_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

 

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to