Hi all,
I have downloaded these following packages and installed them on my
machine (Win 2K):
Apache 2.0.47
Tomcat 2.0.47
Jk2_mod connector 2.0.43.

I have 2 instances of tomcat (tomcat1, tomcat2 on the same host) on my
machine on a load balancing environment. The load balancing works well
with one exception: the session affinity doesn't work as expected.
Everytime I refresh my browser, it gives me a different session id. If
anyone experimented this problem, please help me.
These are my settings and modifications to apache and tomcat.

Apache httpd.conf
==========================================================
LoadModule jk2_module modules/mod_jk2.dll
==========================================================


Apache workers2.properties (entire content)
==========================================================
[logger]
level=DEBUG

[config:]
#file=${serverRoot}/conf/workers2.properties
#file=c:/Apache2/conf/workers2.properties
file=conf/workers2.properties
debug=0
debugEnv=0


[shm:]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers
#file=${serverRoot}/logs/jk2.shm
file=logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

# tomcat1
[channel.socket:localhost:11009]
port=11009
host=localhost
type=ajp13
lb_factor=100

# tomcat2
[channel.socket:localhost:12009]
port=12009
host=localhost
type=ajp13
lb_factor=100

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
#group=status:

[uri:/*.jsp]
info=Extension mapping
==========================================================


Tomcat1 server.xml
==========================================================
1. Comment out Coyote HTTP/1.1 Connector at port 8080
2. Change <Server port="8005" shutdown="SHUTDOWN" debug="0"> to <Server
port="11005" shutdown="SHUTDOWN" debug="0">
3. Change 
  <Engine name="Standalone" defaultHost="localhost" debug="0" > to
  <Engine name="Standalone" defaultHost="localhost" debug="0"
jvmRoute="tomcat1"> 
(notice: I DID rename the misspelling from jmvRoute to jvmRoute in the
orginal release)

4. Change Coyote/JK2 AJP 1.3 Connector to listen at 11009
5. No change for jk2.properties
==========================================================


Tomcat2 server.xml
==========================================================
The same with Tomcat1, but with different port numbers (12005 for
server, 12009 for Coyote/JK2 AJP 1.3 Connector)
==========================================================

At the ROOT directory of each tomcat instance, I create a jsp file with
a single command "request.getSession().getId()"

Then I start tomcat1, tomcat2, apache (in order). Everything is OK. No
error reported on the screen.

The only bad thing is that with every request, this page returns a
different session id (they are suffixed with .tomcat1 and .tomcat2), if
the session affinity works correctly, they must be the same, right? Is
there anything wrong with my configuration?

If anyone have solution, please share it to me. I appreciate it.

Dinh.





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

Reply via email to