users@glassfish.java.net

problem for apache http server with Glassfish load balancing

From: <glassfish_at_javadesktop.org>
Date: Mon, 24 Nov 2008 21:49:14 PST

I am trying to set up Apache Http Server in front of Glassfish App server with load balancing config.

I am following http://blogs.sun.com/Prashanth/entry/setting_up_load_balancing_in and http://docs.sun.com/app/docs/doc/820-4496/gfaad?l=Ja&a=view.

I put three jars(common-logging, common-modelers and tomcat-ajp.jar) in Glassfish/lib directory.

I have two instances running, instance-ONE and instance-TWO. When I directly hit the web app deployed into the Glassfish, it is accessible.

Now here is the worker.properties.
worker.list=loadbalancer
worker.worker1.type=ajp13
worker.worker1.host=192.168.168.65
worker.worker1.port=18009
worker.worker1.lbfactor=50
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

worker.worker2.type=ajp13
worker.worker2.host=192.168.168.65
worker.worker2.port=18010
worker.worker2.lbfactor=50
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=300
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1,worker2

and modified httpd.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/worker.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /*.jsp loadbalancer
JkMount /clusterjsp/* loadbalancer

<VirtualHost 192.168.168.65>
        DocumentRoot C:/Apache20/Apache2/www/clusterjsp
        ServerName 192.168.168.65
        ErrorLog logs/clusterjsp.log
        TransferLog logs/clusterjsp-access_log.log
</VirtualHost>

when I hit the http://192.168.168.168/index.jsp, I am getting "Not Found

The requested URL /clusterjsp/index.jsp was not found on this server.
"

When I looked at the mod_jk.log, the config looks fine.
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2249): worker worker1 contact is '192.168.168.65:18009'
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2380): setting endpoint options:
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2383): keepalive: 1
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2387): timeout: 300
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2391): buffer size: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2395): pool timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2399): connect timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2403): reply timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2407): prepost timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2411): recovery options: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2415): retries: 2
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2419): max packet size: 8192
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2288): setting connection pool size to 250 with min 125
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_worker.c (145): about to create instance worker2 of ajp13
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_worker.c (158): about to validate and init worker2
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2249): worker worker2 contact is '192.168.168.65:18010'
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2380): setting endpoint options:
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2383): keepalive: 1
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2387): timeout: 300
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2391): buffer size: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2395): pool timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2399): connect timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2403): reply timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2407): prepost timeout: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2411): recovery options: 0
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2415): retries: 2
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2419): max packet size: 8192
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_ajp_common.c (2288): setting connection pool size to 250 with min 125
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_lb_worker.c (1380): Balanced worker 0 has name worker1 and route worker1 in domain
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_lb_worker.c (1380): Balanced worker 1 has name worker2 and route worker2 in domain
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_lb_worker.c (243): worker worker1 gets multiplicity 1
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_lb_worker.c (243): worker worker2 gets multiplicity 1
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_lb_worker.c (288): syncing shm for lb 'loadbalancer' from mem
[Tue Nov 25 00:45:32 2008] [4984:5836] [info] mod_jk.c (2825): mod_jk/1.2.26 initialized
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_shm.c (90): Shared memory is already opened
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] jk_shm.c (184): Attached shared memory [1] size=28672 free=27448 addr=0x5de600
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] mod_jk.c (2730): Attached shm:memory (28672 bytes)
[Tue Nov 25 00:45:32 2008] [4984:5836] [debug] mod_jk.c (2740): Initialized mod_jk/1.2.26
[Tue Nov 25 00:45:42 2008] [4984:5876] [debug] mod_jk.c (3033): missing uri map for 192.168.168.65:/clusterjsp/index.html
[Tue Nov 25 00:45:42 2008] [4984:5876] [debug] mod_jk.c (3190): missing uri map for 192.168.168.65:/clusterjsp/index.html
[Tue Nov 25 00:45:48 2008] [4984:5876] [debug] mod_jk.c (3033): missing uri map for 192.168.168.65:/index.html
[Tue Nov 25 00:45:48 2008] [4984:5876] [debug] mod_jk.c (3190): missing uri map for 192.168.168.65:/index.html
[Tue Nov 25 00:45:50 2008] [4984:5876] [debug] mod_jk.c (3033): missing uri map for 192.168.168.65:/index.html
[Tue Nov 25 00:45:50 2008] [4984:5876] [debug] mod_jk.c (3190): missing uri map for 192.168.168.65:/index.html


Does anybody know what is wrong or missing?

It would be grateful if someone gives me a hint.
[Message sent by forum member 'caesarkim1' (caesarkim1)]

http://forums.java.net/jive/thread.jspa?messageID=318547