I'll jump back into this discussion.

I finally got the developers to get rid of their silly login servlet, and now 
we're running with a proper FORM based authentication (setup via the web.xml) 
using JAAS in JBoss.

I think I may have discovered the reason for why the login isn't being 
clustered, but I can't explain why it's happening.

The setup as it stands right now:
 * Apache w/ mod_jk on machine A, JBoss on machines B and C.
 * Sticky sessions enabled.

Here's the two situations I've found.  To me, it looks like either I have a 
setting wrong, or there's a bug somewhere.

Scenario 1:
 - Machine B starts JBoss.
 - User logs into the app through machine A.
 - Everything's hunky-dory.  The user can move about and see everything like it 
should be.
 - Machine C starts JBoss.  Log messages show that B and C are talking to each 
other.
 - Machine B stops JBoss.
 - User tries to do something else, and they get a login prompt.

In this scenario, the clustering logs show that the session that was created on 
B for the user was never replicated over to C.  This one looks like I'm 
possibly not setting something that says to request all data on joining cluster.

Scenario 2:
 - Machine B starts JBoss.
 - User logs into the app through machine A, and everything's fine.
 - Machine C starts JBoss.  Logs say they talk to each other.
 - User performs another action.  Here, we see machine B (remember - sticky 
sessions) push the session information over to machine C, and we see machine C 
get the information:

2005-05-27 14:37:07,992 DEBUG [org.jgroups.blocks.RpcDispatcher] 
[sender=MachineB:2529], method_call: _replicate(prepare(<MachineB:2529>:6, 
[_put(<MachineB:2529>:6, /JSESSION/BzKYRcCq2UTMRNI8VUG3Yw**, 
BzKYRcCq2UTMRNI8VUG3Yw**, null, true)], MachineB:2529, false))

 - Machine B stops JBoss.
 - User tries to do something else, and gets a login message.

At this point, the logs in machine C are fishy:

2005-05-27 14:37:28,626 INFO  [org.jboss.cache.TreeCache] viewAccepted(): new 
members: [MachineC:1799]

 (comment: yup, machine C realized that machine B dropped out of the cluster)

2005-05-27 14:37:36,899 DEBUG 
[org.jboss.web.tomcat.tc5.session.JBossCacheManager] loadSession(): id= 
BzKYRcCq2UTMRNI8VUG3Yw**, session=null
2005-05-27 14:37:37,086 DEBUG 
[org.jboss.web.tomcat.tc5.session.JBossCacheManager] loadSession(): id= 
BzKYRcCq2UTMRNI8VUG3Yw**, session=null
2005-05-27 14:37:37,086 DEBUG 
[org.jboss.web.tomcat.tc5.session.JBossCacheManager] loadSession(): id= 
BzKYRcCq2UTMRNI8VUG3Yw**, session=null
2005-05-27 14:37:37,086 DEBUG 
[org.jboss.web.tomcat.tc5.session.JBossCacheManager] loadSession(): id= 
BzKYRcCq2UTMRNI8VUG3Yw**, session=null
2005-05-27 14:37:37,227 DEBUG 
[org.jboss.web.tomcat.tc5.session.ClusteredSession] initAfterLoad(): initialize 
the transient variables ...
2005-05-27 14:37:37,227 DEBUG 
[org.jboss.web.tomcat.tc5.session.SessionIDGenerator] getSessionId called: 
HG4R8B0iA5kATgL8tdl-tg**

It looks like Machine C properly received a request for the session with the 
correct ID (the one it was assigned to on machine B), but machine C either 
can't find the session or somehow loses the session, and assigns the user a new 
session.

Any clues as to why either of these scenarios are happening?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879304#3879304

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879304


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to