tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trout <jeff.tr...@corp.terralycos.com>
Subject Tomcat 4 & IIS5 - HTTPExtensionProc not getting the filter's added headers
Date Fri, 16 Jan 2004 14:28:35 GMT
[Note: this is little lengthy and detailed]

I'm trying to get Tomcat 4.1.27 (Older, I know but I don't think thats
the issue as hitting Tomcat direct is fine), IIS5 and the connector
working. (The problem occurs on both jk1 and jk2).  I have two machines
currently: Machine A is running 2k sp2, the other is running 2k sp4. 
The sp4 box is what we will run on in production.

Tomcat &amp; IIS work like a champ on Machine A.  

They do not work on machine B.  I turned on verbose logging in 
isapi_redirect.dll to see what was going on.  
I'd see the filter execute, detect that the URI was for a servlet and 
try to pass the request down to the actual proxy part of the module.  
HTTPExtensionProc would start up and would fail to get a name for a 
worker.  I found that odd.  So I pulled up the source (for jk2) and saw 
that the filter adds some HTTP headers to the request that 
HTTPExtensionProc would use to make life better.  The only way I could 
see for it to not get the name was if the header was missing.

I decided to verify my theory, so on machine A I whipped up a little asp
that dumps all the server variables (Request.ServerVariables) to see
if this is true.  Sure enough when I requested a servlet URL the filter
decided it was in fact a servlet url and passed the request to my asp.
I saw the following headers added: HTTP_TOMCATURI, HTTP_TOMCATQUERY, and
 HTTP_TOMCATWORKER.  So I bought the asp over to machine B and tried the
same thing and lo and behold - there were no Tomcat variables. 

I've been googling for quite a while and haven't found any reason why 
they wouldn't be set.  We're not running URLScan or any other software
that should be changing the headers.  The only other ISAPI modules
loaded are sspifilt (ssl), compression and md5filt - all standard ones. 
The IIS configurations are the same as far as I know, I'm not sure about
all the arcane things that may be floating in the metabase.  The big
difference here is that one machine runs SP2(which works) and the other
runs SP4. 

Here's some exciting log output (isapi_redirect.dll log, level=debug):

Machine A [Successful request][jk1]

[Fri Jan 16 00:35:37 2004]  [jk_isapi_plugin.c (655)]: Detected IIS >=
5.0
00:35:37 2004]  [jk_isapi_plugin.c (765)]: In HttpFilterProc test
Default redirection of /NASApp/bon/pub/servlet/BAServConfig[Fri Jan 16
00:35:37 2004]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Jan 16 00:35:37 2004] [jk_uri_worker_map.c (477)]: Attempting to
map URI'/NASApp/bon/pub/servlet/BAServConfig'
[Fri Jan 16 00:35:37 2004] [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/NASApp/bon/pub/
[Fri Jan 16 00:35:37 2004]  [jk_isapi_plugin.c (775)]:
HttpFilterProc[/NASApp/bon/pub/servlet/BAServConfig] is a servlet url -
should redirect to ajp13
[Fri Jan 16 00:35:37 2004]  [jk_isapi_plugin.c (838)]: HttpFilterProc
check if [/NASApp/bon/pub/servlet/BAServConfig] is points to the web-inf
directory[Fri Jan 16 00:35:37 2004] [jk_isapi_plugin.c(878)]:
HttpExtensionProc started
[Fri Jan 16 00:35:37 2004] [jk_worker.c (132)]:
Into wc_get_worker_for_name ajp13
[Fri Jan 16 00:35:37 2004] [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker[Fri Jan 16 00:35:37 2004]  [jk_isapi_plugin.c
(913)]: HttpExtensionProc got a worker for name ajp13

We see things are fine and dandy....

Here's the same request, but to Machine B. [jk1]

[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (655)]: Detected IIS >=
5.0
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (696)]:
HttpFilterProc started
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (765)]: In HttpFilterProc
test Default redirection of/NASApp/bon/pub/servlet/BAServConfig
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (477)]: Attempting to
map URI'/NASApp/bon/pub/servlet/BAServConfig'
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/NASApp/bon/pub/
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (775)]: HttpFilterProc
[/NASApp/bon/pub/servlet/BAServConfig] is a servlet url - should
redirect to ajp13
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (838)]:
HttpFilterProc check if [/NASApp/bon/pub/servlet/BAServConfig] is points
to the web-inf directory
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (696)]: HttpFilterProc
started
[Fri Jan 16 08:16:22 2004] [jk_isapi_plugin.c (759)]: In
HttpFilterProc Virtual Host redirection
of/bosimmux1.bos.lycos.com/jakarta/isapi_redirect.dll
[Fri Jan 16 08:16:22 2004]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (477)]: Attempting to
map URI'/bosimmux1.bos.lycos.com/jakarta/isapi_redirect.dll
[Fri Jan 16 08:16:22 2004]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (765)]: In HttpFilterProc
test Default redirection of /jakarta/isapi_redirect.dll
[Fri Jan 16 08:16:22 2004]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (477)]: Attempting to
map URI'/jakarta/isapi_redirect.dll
[Fri Jan 16 08:16:22 2004] [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Fri Jan 16 08:16:22 2004]  [jk_isapi_plugin.c (829)]: HttpFilterProc
[/jakarta/isapi_redirect.dll] is not a servlet url

Interesting, why is not treating isapi_redirect as an executable.. 

I found the answer to that by trying out jk2 which reported [after
HTTPFilterProc decided this was a servlet request]: 

[Thu Jan 15 09:33:46 2004] (debug ) [jk_isapi_plugin.c (473)] 
HttpExtensionProc started
[Thu Jan 15 09:33:46 2004] (debug )[jk_isapi_plugin.c (482)] 
HttpExtensionProc could not get a worker for name
[Thu Jan 15 09:33:46 2004] (error ) [jk_isapi_plugin.c (488)]
HttpExtensionProc worker is NULL

So then I changed extension_uri to my little HTTP header asp I mentioned
earlier and those Tomcat headers were non existant, which is likely the 
cause of my problems... There are also no errors dumped out by the 
filter, like setheader failed.. 

Any ideas / suggestions?

I just saw a post about the jk2 installer, so I tried that - same thing
happens.

I'm thinking there is some obscure IIS thing. 


-- 
Jeff Trout <jeff.trout@corp.terralycos.com>
Global Engineering / Terra Lycos

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


Mime
View raw message