Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: Mod_Jk with Apache 2.2.4 prompts for login twice

Posted on 2008-04-16 17:46:30 by souporpower

We have 2 tomcat servers being load-balanced by a front-end apache
server using mod-jk. Whenever we open a new browser and point the url
to the http://fakedomain.com/xyz/content/home/home.jsf and submit the
form, we get back the same form again with sessionid. Effectively, we
end up logging in twice. In other words, the form is fetched twice and
submitted twice.

Can anyone please guess what's going on ?

Here are the worker.properties:

worker.list=loadbalancer
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1,worker2

worker.worker1.type=ajp13
worker.worker1.host=172.16.170.30
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.retries=1

worker.worker2.type=ajp13
worker.worker2.host=172.16.170.35
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.retries=1

This is mod-jk.conf

# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so

# Where to find workers.properties
JkWorkersFile conf/worker.properties

# Where to put jk logs
JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel debug

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

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

# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"

# Mount your applications
JkMount /nva/* loadbalancer
JkMount /dwr/* loadbalancer
#JkMount /es/* es
JkMount /es/* loadbalancer

# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties

# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
JkShmFile logs/jk.shm

# Add jkstatus for managing runtime data
<Location /jkstatus/>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>

Finally in httpd.conf we have this line

Include conf/mod-jk.conf

If don't see any errors. What should I be looking in the debug output?

Thanks

Report this message

#2: Re: Mod_Jk with Apache 2.2.4 prompts for login twice

Posted on 2008-04-17 13:28:00 by souporpower

On Apr 16, 11:46=A0am, "souporpo...@gmail.com" <souporpo...@gmail.com>
wrote:
> We have 2 tomcat servers being load-balanced by a front-end apache
> server using mod-jk. Whenever we open a new browser and point the url
> to thehttp://fakedomain.com/xyz/content/home/home.jsfand submit the
> form, we get back the same form again with sessionid. Effectively, we
> end up logging in twice. In other words, the form is fetched twice and
> submitted twice.
>
> Can anyone please guess what's going on ?
>
> Here are the worker.properties:
>
> worker.list=3Dloadbalancer
> worker.loadbalancer.type=3Dlb
> worker.loadbalancer.balance_workers=3Dworker1,worker2
>
> worker.worker1.type=3Dajp13
> worker.worker1.host=3D172.16.170.30
> worker.worker1.port=3D8009
> worker.worker1.lbfactor=3D1
> worker.worker1.retries=3D1
>
> worker.worker2.type=3Dajp13
> worker.worker2.host=3D172.16.170.35
> worker.worker2.port=3D8009
> worker.worker2.lbfactor=3D1
> worker.worker2.retries=3D1
>
> This is mod-jk.conf
>
> =A0# Load mod_jk module
> # Specify the filename of the mod_jk lib
> LoadModule jk_module modules/mod_jk.so
>
> # Where to find workers.properties
> JkWorkersFile conf/worker.properties
>
> # Where to put jk logs
> JkLogFile logs/mod_jk.log
>
> # Set the jk log level [debug/error/info]
> JkLogLevel debug
>
> # Select the log format
> JkLogStampFormat =A0"[%a %b %d %H:%M:%S %Y]"
>
> # JkOptions indicates to send SSK KEY SIZE
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat
> JkRequestLogFormat "%w %V %T"
>
> # Mount your applications
> JkMount /nva/* loadbalancer
> JkMount /dwr/* loadbalancer
> #JkMount /es/* es
> JkMount /es/* loadbalancer
>
> # You can use external file for mount points.
> # It will be checked for updates each 60 seconds.
> # The format of the file is: /url=3Dworker
> # /examples/*=3Dloadbalancer
> JkMountFile conf/uriworkermap.properties
>
> # Add shared memory.
> # This directive is present with 1.2.10 and
> # later versions of mod_jk, and is needed for
> # for load balancing to work properly
> JkShmFile logs/jk.shm
>
> # Add jkstatus for managing runtime data
> <Location /jkstatus/>
> =A0 =A0 JkMount status
> =A0 =A0 Order deny,allow
> =A0 =A0 Deny from all
> =A0 =A0 Allow from 127.0.0.1
> </Location>
>
> Finally in httpd.conf we have this line
>
> Include conf/mod-jk.conf
>
> If don't see any errors. What should I be looking in the debug output?
>
> Thanks

The problem was found as the duplicate jvmroute in the Tomcat
server.xml.

Report this message