DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37269>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37269

           Summary: A
           Product: Tomcat 5
           Version: 5.5.9
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Hi,

I don't know if this is the right place, maybe it's a bug in mod_jk, maybe in
Tomcat, or maybe there's no bug at all...

I have configured a mod_jk loadbalancer on Apache 2. I have two tomcats running
on  two differents servers. I don't have activated the cluster element in
server.xml. Both tomcats are running the same webapp. In the title of every jsp
I write the name of the server so that I can check that sticky session works.
And it doesn't.

Here is my workers.properties :

----------------------------------------------------------
worker.list=loadbalancer,status
worker.node1.port=8009
worker.node1.host=noeud_1
worker.node1.type=ajp13
worker.node1.lbfactor=1

worker.node2.port=8009
worker.node2.host=noeud_2
worker.node2.type=ajp13
worker.node2.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=true
worker.loadbalancer.balance_workers=node1, node2

# Status worker for managing load balancer
worker.status.type=status

----------------------------------------------------------

noeud_1 and noeud_2 are the tomcat servers.

In each tomcats I've added the jvmRoute attribute :

----------------------------------------------------------
<Engine name="Catalina" defaultHost="localhost" jvmRoute="noeud_1">
------------------------------------------------------------

Of course on the noeud_2 server I wrote jvmRoute="noeud_2"...

Here is my jk.load file :

-----------------------------------------------------------
JkWorkersFile /etc/apache2/workers.properties

JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"

# JkOptions indicates to send SSK KEY SIZE
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

JkRequestLogFormat "%w %V %T"

JkMount /* loadbalancer
JkMount /jkstatus status

JkShmFile /var/log/apache2/jk.shm

<Location /jkstatus/>
        JkMount status
        Order deny,allow
        Deny from all
        Allow from all
</Location>
------------------------------------------------------------

And finally here is the way I write the server name in jsps :

<title><% java.net.InetAddress local =
java.net.InetAddress.getLocalHost();out.print(local.getHostName()); %></title>



Now the test :

I open http://MY_SERVER/ in firefox :

I see "noeud_1" in the title.
I have a JSESSIONIN in HTTP Headers.
I press F5 to reload
I see "noeud_2" in the title.
I still have the same JSESSIONID...

So is it normal ? I think that the point of sticky session is to always redirect
to the same server right ? Did I forgot something in some config files ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to