tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MBAa...@checkfree.com
Subject mod_jk Virtual Host port problem.
Date Thu, 31 Oct 2002 22:45:46 GMT
Hi all.

I am currently running apache 1.3.27 with mod_jk 1.2 and tomcat 4.0.6.
Apache and Tomcat are on different servers.  Apache is running on a server
behind a load balancer which directs traffic to the virtual host.  So
traffic coming to the server from the outside world over port 80 will hit
the LB and be forwarded to Apache on port 8888.  Apache then sends the
request to Tomcat via AJP13.  All of this is working correctly except for
the following issue:

We are using Single SignOn on Tomcat.  What I am seeing is that when Tomcat
processes the request for a page - let's say index.jsp - it calls the
authentication mgr which sends a client redirect to the page requested.  It
seems that the redirect is going to the VirtualHost port rather than the
port specified in the Apache VH config via the Port command (see config
below).

I've done some digging in the log files and am seeing that mod_jk is
sending the AJP13 listener the VH port rather than the specified port.  See
below.

Is there anyway to force mod_jk to send the AJP13 listener a specified
port?

Thanks in advance for your help.


Apache VH config:
#############################################
# Virtual Host Config for Test
#############################################

Listen 8888
<VirtualHost *:8888>
DocumentRoot "/htdocs/test"
UseCanonicalName on
ServerName test.checkfree.com
Port 80
ServerAdmin mbaaron@checkfree.com

SSLEngine off


# Deny direct access to WEB-INF and META-INF
#
<Location "/test/WEB-INF/*">
    AllowOverride None
    deny from all
</Location>

<Location "/test/META-INF/*">
    AllowOverride None
    deny from all
</Location>

<Location "/test/">
    AllowOverride None
    DirectoryIndex index.html index.htm index.jsp
</Location>

JkMount /test/* testworker1
JkMount /test/servlet/* testworker1
JkMount /test/*.jsp testworker1


</VirtualHost>

Selected Catalina Log excerpt:

2002-10-31 17:39:46 Ajp13Connector[9938] accepted socket, assigning to
processor.
2002-10-31 17:39:46 Ajp13Connector[9938] about to create a processor,
available=4, created=5, maxProcessors=75
2002-10-31 17:39:46 Ajp13Processor[9938][4]  An incoming request is being
assigned
2002-10-31 17:39:46 Ajp13Connector[9938] accepting socket...
2002-10-31 17:39:46 Ajp13Processor[9938][4]   The incoming request has been
awaited
2002-10-31 17:39:46 Ajp13Processor[9938][4] socket assigned.
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] setSocket()
2002-10-31 17:39:46 Ajp13Processor[9938][4] waiting on next request...
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] receiveNextRequest()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] receive()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] read got # 4
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] Received 4 464 18
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] read got # 464
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] receive:  total read =
464
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] Received 2
JK_AJP13_FORWARD_REQUEST
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler]
decodeRequest()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler] ===
BaseRequest ===
method          = GET
protocol        = HTTP/1.1
requestURI      = /test/index.jsp
remoteAddr      = XXX.XXX.XXX.XXX
remoteHost      = null
serverName      = test.checkfree.com
serverPort      = 8888
remoteUser      = null
authType        = null
queryString     = null
scheme          = http
secure          = false
contentLength   = 0
contentType     = null
attributes      = {}
headers         = === MimeHeaders ===
accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/pdf, */*
accept-encoding = gzip, deflate
accept-language = en-us
connection = Keep-Alive
cookie = SITESERVER=ID=c13810df4f4705ab90be5253d2417197
host = test.checkfree.com
user-agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461;
Q312461)
content-length = 0

cookies         = === Cookies ===
Cookie SITESERVER=ID=c13810df4f4705ab90be5253d2417197 ; 0 null null

jvmRoute        = null

2002-10-31 17:39:46 Ajp13Processor[9938][4] received next request,
status=200
2002-10-31 17:39:46 Ajp13Request[5]  Adding cookie
SITESERVER=ID=c13810df4f4705ab90be5253d2417197
2002-10-31 17:39:46 Ajp13Processor[9938][4] invoking...
2002-10-31 17:39:46 RequestDumperValve[Standalone]: REQUEST URI
=/test/index.jsp
2002-10-31 17:39:46 RequestDumperValve[Standalone]:           authType=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:  characterEncoding=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:      contentLength=0
2002-10-31 17:39:46 RequestDumperValve[Standalone]:        contentType=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:        contextPath=
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
cookie=SITESERVER=ID=c13810df4f4705ab90be5253d2417197
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=cookie=SITESERVER=ID=c13810df4f4705ab90be5253d2417197
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=connection=Keep-Alive
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=accept-encoding=gzip, deflate
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/pdf, */*
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=content-length=0
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=accept-language=en-us
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
T312461; Q312461)
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=host=test.checkfree.com
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
locale=en_US
2002-10-31 17:39:46 RequestDumperValve[Standalone]:             method=GET
2002-10-31 17:39:46 RequestDumperValve[Standalone]:           pathInfo=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
protocol=HTTP/1.1
2002-10-31 17:39:46 RequestDumperValve[Standalone]:        queryString=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
remoteAddr=XXX.XXX.XXX.XXX
2002-10-31 17:39:46 RequestDumperValve[Standalone]:         remoteHost=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:         remoteUser=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]: requestedSessionId=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:             scheme=http
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
serverName=test.checkfree.com
2002-10-31 17:39:46 RequestDumperValve[Standalone]:         serverPort=8888
2002-10-31 17:39:46 RequestDumperValve[Standalone]:        servletPath=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
isSecure=false
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
---------------------------------------------------------------
2002-10-31 17:39:46 StandardEngine[Standalone]: Mapping server name
'test.checkfree.com'
2002-10-31 17:39:46 StandardEngine[Standalone]:  Trying a direct match
2002-10-31 17:39:46 StandardEngine[Standalone]:  Trying an alias match
2002-10-31 17:39:46 StandardEngine[Standalone]:  Trying the default host
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler]
sendHeaders()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler] status
is:  302(Moved Temporarily)
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send() 311 65
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler]
doWrite(byte[], 0, 647)
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send() 655 65
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
---------------------------------------------------------------
2002-10-31 17:39:46 RequestDumperValve[Standalone]:           authType=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:      contentLength=-1
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
contentType=text/html
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
cookie=JSESSIONID=25374B7160D5CE06B46F4F91F85F9861; domain=null; path=/test
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=Pragma=No-cache
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=Location=http://test.checkfree.com:8888/test/login.jsp;jsessionid=25374B7160D5CE06B46F4F91F85F9861
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=Set-Cookie=JSESSIONID=25374B7160D5CE06B46F4F91F85F9861;Path=/test
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=Cache-Control=no-cache
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
header=Expires=Thu, 01 Jan 1970 00:00:00 GMT
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
message=Moved Temporarily
2002-10-31 17:39:46 RequestDumperValve[Standalone]:         remoteUser=null
2002-10-31 17:39:46 RequestDumperValve[Standalone]:             status=302
2002-10-31 17:39:46 RequestDumperValve[Standalone]:
===============================================================
2002-10-31 17:39:46 Ajp13Processor[9938][4] done invoking, finishing
request/response....
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] [RequestHandler] finish
()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] send() 6 65
2002-10-31 17:39:46 Ajp13Processor[9938][4] finished handling request.
2002-10-31 17:39:46 Ajp13Processor[9938][4] recyling objects ...
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] recycle()
2002-10-31 17:39:46 Ajp13Processor[9938][4] waiting on next request...
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] receiveNextRequest()
2002-10-31 17:39:46 Ajp13Processor[9938][4] [Ajp13] receive()

Michael B Aaron
Systems Engineer
mbaaron@checkfree.com
Phone: (678) 375-4318

The #1 Way to Pay Online
http://www.checkfree.com/paybillsonline




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message