You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Skeet <jo...@peramon.com> on 2003/09/19 15:22:01 UTC

IIS 5.1 and Tomcat 4

I'm trying to get IIS 5.1 and Tomcat 4 to play nicely together.

So far I've not got very far.

I've got:

o isapi_redirect.dll from
http://apache.oregonstate.edu/jakarta/tomcat-3/bin/win32/i386/
(That's the only place I could find it, and it took a while to find...
should I be worried that it's in the Tomcat 3 directory?)

o Registry entries in Jakarta Isapi Redirector\1.0 (which I think are
okay)

workers.properties and uriworkermap.properties which I think are okay.
Only useful bits in them are:

[workers.properties]
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

[uriworkermap.properties]
default.worker=ajp13
/mobilizer/*=$(default.worker)

server.xml has:
    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8081 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8081" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="0"
               useURIValidationHack="false"
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

I was slightly unsure about this - given that I want the first one (note
the non-default port, by the way) do I actually need the second? Should
I just be able to change teh port in workers.properties?

The servlets work fine from the HTTP connector.

IIS has a jakarta virtual directory with execute script permission, the
ISAPI filter is up (green arrow), but I get:
"The specified module could not be found." on my web browser.

The catalina log has:
2003-09-19 14:02:42 Ajp13Connector[8009] Opening server socket on all
host IP addresses
2003-09-19 14:02:42 Ajp13Connector[8009] Starting background thread
2003-09-19 14:02:42 Ajp13Processor[8009][0] Starting background thread
2003-09-19 14:02:42 Ajp13Processor[8009][1] Starting background thread
2003-09-19 14:02:42 Ajp13Processor[8009][2] Starting background thread
2003-09-19 14:02:42 Ajp13Processor[8009][3] Starting background thread
2003-09-19 14:02:43 Ajp13Processor[8009][4] Starting background thread

The localhost log doesn't seem to mention anything in particular.

The isapi log has lines such as:
[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
started
[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
Virtual Host redirection of /localhost/mobilizer/mobilizer
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/localhost/mobilizer/mobilizer'
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
test Default redirection of /mobilizer/mobilizer
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/mobilizer/mobilizer'
[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/mobilizer/
[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
[/mobilizer/mobilizer] is a servlet url - should redirect to ajp13
[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
check if [/mobilizer/mobilizer] is points to the web-inf directory
[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
started
[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
Virtual Host redirection of /localhost/mobilizer/mobilizer/
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/localhost/mobilizer/mobilizer/'
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
test Default redirection of /mobilizer/mobilizer/
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/mobilizer/mobilizer/'
[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/mobilizer/
[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
[/mobilizer/mobilizer/] is a servlet url - should redirect to ajp13
[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
check if [/mobilizer/mobilizer/] is points to the web-inf directory

Any clues as to what I'm missing?

I haven't worked out the difference between jk and jk2, and which I
should be using - I've seen different registry entries available for
jk2, but I'd like to know whether or not the above *should* work first -
and why (if at all) I should change to use jk2.

Any help gratefully received.
Jon

Re: IIS 5.1 and Tomcat 4

Posted by Mats Andersson <ma...@xantus.se>.
I think you must have this row in your workers.properties:
worker.list=ajp13

More comments are embedded in your text below.

Please let me know it this helps.
/Mats

Jon Skeet wrote:

>I'm trying to get IIS 5.1 and Tomcat 4 to play nicely together.
>
>So far I've not got very far.
>
>I've got:
>
>o isapi_redirect.dll from
>http://apache.oregonstate.edu/jakarta/tomcat-3/bin/win32/i386/
>(That's the only place I could find it, and it took a while to find...
>should I be worried that it's in the Tomcat 3 directory?)
>
Go here instead. Seems better.
http://www.apache.org/dist/jakarta/tomcat-connectors/

>
>o Registry entries in Jakarta Isapi Redirector\1.0 (which I think are
>okay)
>
They are, you have the green up

>
>workers.properties and uriworkermap.properties which I think are okay.
>Only useful bits in them are:
>
>[workers.properties]
>worker.ajp13.port=8009
>worker.ajp13.host=localhost
>worker.ajp13.type=ajp13
>worker.ajp13.lbfactor=1
>
>[uriworkermap.properties]
>default.worker=ajp13
>/mobilizer/*=$(default.worker)
>
>server.xml has:
>    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8081 -->
>    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>               port="8081" minProcessors="5" maxProcessors="75"
>               enableLookups="true" redirectPort="8443"
>               acceptCount="10" debug="0" connectionTimeout="0"
>               useURIValidationHack="false"
> 
>protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
>
>    <!-- Define an AJP 1.3 Connector on port 8009 -->
>    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>               port="8009" minProcessors="5" maxProcessors="75"
>               acceptCount="10" debug="0"/>
>
>I was slightly unsure about this - given that I want the first one (note
>the non-default port, by the way) do I actually need the second? Should
>I just be able to change teh port in workers.properties?
>  
>
workers.properties in your configuration tells IIS that your worker 
(=tomcat) will listen at port 8009) while the

Connector declaration in server.xml tells tomcat that it sould start the AJP13 Connector
on port 8009. So, you need both.


>The servlets work fine from the HTTP connector.
>
>IIS has a jakarta virtual directory with execute script permission, the
>ISAPI filter is up (green arrow), but I get:
>"The specified module could not be found." on my web browser.
>
>The catalina log has:
>2003-09-19 14:02:42 Ajp13Connector[8009] Opening server socket on all
>host IP addresses
>2003-09-19 14:02:42 Ajp13Connector[8009] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][0] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][1] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][2] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][3] Starting background thread
>2003-09-19 14:02:43 Ajp13Processor[8009][4] Starting background thread
>
>The localhost log doesn't seem to mention anything in particular.
>
>The isapi log has lines such as:
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
>started
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
>Virtual Host redirection of /localhost/mobilizer/mobilizer
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/localhost/mobilizer/mobilizer'
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (456)]:
>jk_uri_worker_map_t::map_uri_to_worker, done without a match
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
>test Default redirection of /mobilizer/mobilizer
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/mobilizer/mobilizer'
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (391)]:
>jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
>/mobilizer/
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
>[/mobilizer/mobilizer] is a servlet url - should redirect to ajp13
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
>check if [/mobilizer/mobilizer] is points to the web-inf directory
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
>started
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
>Virtual Host redirection of /localhost/mobilizer/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/localhost/mobilizer/mobilizer/'
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (456)]:
>jk_uri_worker_map_t::map_uri_to_worker, done without a match
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
>test Default redirection of /mobilizer/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/mobilizer/mobilizer/'
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (391)]:
>jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
>/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
>[/mobilizer/mobilizer/] is a servlet url - should redirect to ajp13
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
>check if [/mobilizer/mobilizer/] is points to the web-inf directory
>
>Any clues as to what I'm missing?
>  
>
IIS does listen on your requests and the dll is registered ok, but for 
some reason it can't map the request
to a worker (= a running tomcat instance). I think it is because you 
miss the worker.list as I described it
above.

>I haven't worked out the difference between jk and jk2, and which I
>should be using - I've seen different registry entries available for
>jk2, but I'd like to know whether or not the above *should* work first -
>and why (if at all) I should change to use jk2.
>  
>
I use jk2. Some people say it is not as stable as jk, but I have not 
encountered any problems with it yet.
My reason is that the old jk does not support MBeans, don't ask what it 
is more precisely, but my tomcat
will generate a (harmless) stacktrace at the beginning telling me this. 
Later when I shut my tomcat down,
the shutdown process takes a long time, probably waiting to shut down 
the jk module in tomcat, which does
not support being shut down like a MBean or something. Have you the same 
experience with jk?

>Any help gratefully received.
>Jon
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>


Re: IIS 5.1 and Tomcat 4

Posted by Mats Andersson <ma...@xantus.se>.
I think you must have this row in your workers.properties:
worker.list=ajp13

More comments are embedded in your text below.

Please let me know it this helps.
/Mats

Jon Skeet wrote:

>I'm trying to get IIS 5.1 and Tomcat 4 to play nicely together.
>
>So far I've not got very far.
>
>I've got:
>
>o isapi_redirect.dll from
>http://apache.oregonstate.edu/jakarta/tomcat-3/bin/win32/i386/
>(That's the only place I could find it, and it took a while to find...
>should I be worried that it's in the Tomcat 3 directory?)
>
Go here instead. Seems better.
http://www.apache.org/dist/jakarta/tomcat-connectors/

>
>o Registry entries in Jakarta Isapi Redirector\1.0 (which I think are
>okay)
>
They are, you have the green up

>
>workers.properties and uriworkermap.properties which I think are okay.
>Only useful bits in them are:
>
>[workers.properties]
>worker.ajp13.port=8009
>worker.ajp13.host=localhost
>worker.ajp13.type=ajp13
>worker.ajp13.lbfactor=1
>
>[uriworkermap.properties]
>default.worker=ajp13
>/mobilizer/*=$(default.worker)
>
>server.xml has:
>    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8081 -->
>    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>               port="8081" minProcessors="5" maxProcessors="75"
>               enableLookups="true" redirectPort="8443"
>               acceptCount="10" debug="0" connectionTimeout="0"
>               useURIValidationHack="false"
> 
>protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
>
>    <!-- Define an AJP 1.3 Connector on port 8009 -->
>    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>               port="8009" minProcessors="5" maxProcessors="75"
>               acceptCount="10" debug="0"/>
>
>I was slightly unsure about this - given that I want the first one (note
>the non-default port, by the way) do I actually need the second? Should
>I just be able to change teh port in workers.properties?
>  
>
workers.properties in your configuration tells IIS that your worker 
(=tomcat) will listen at port 8009) while the

Connector declaration in server.xml tells tomcat that it sould start the AJP13 Connector
on port 8009. So, you need both.


>The servlets work fine from the HTTP connector.
>
>IIS has a jakarta virtual directory with execute script permission, the
>ISAPI filter is up (green arrow), but I get:
>"The specified module could not be found." on my web browser.
>
>The catalina log has:
>2003-09-19 14:02:42 Ajp13Connector[8009] Opening server socket on all
>host IP addresses
>2003-09-19 14:02:42 Ajp13Connector[8009] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][0] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][1] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][2] Starting background thread
>2003-09-19 14:02:42 Ajp13Processor[8009][3] Starting background thread
>2003-09-19 14:02:43 Ajp13Processor[8009][4] Starting background thread
>
>The localhost log doesn't seem to mention anything in particular.
>
>The isapi log has lines such as:
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
>started
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
>Virtual Host redirection of /localhost/mobilizer/mobilizer
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/localhost/mobilizer/mobilizer'
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (456)]:
>jk_uri_worker_map_t::map_uri_to_worker, done without a match
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
>test Default redirection of /mobilizer/mobilizer
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/mobilizer/mobilizer'
>[Fri Sep 19 14:04:40 2003]  [jk_uri_worker_map.c (391)]:
>jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
>/mobilizer/
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
>[/mobilizer/mobilizer] is a servlet url - should redirect to ajp13
>[Fri Sep 19 14:04:40 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
>check if [/mobilizer/mobilizer] is points to the web-inf directory
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc
>started
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc
>Virtual Host redirection of /localhost/mobilizer/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/localhost/mobilizer/mobilizer/'
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (456)]:
>jk_uri_worker_map_t::map_uri_to_worker, done without a match
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc
>test Default redirection of /mobilizer/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (351)]: Into
>jk_uri_worker_map_t::map_uri_to_worker
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (368)]: Attempting to
>map URI '/mobilizer/mobilizer/'
>[Fri Sep 19 14:19:23 2003]  [jk_uri_worker_map.c (391)]:
>jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
>/mobilizer/
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc
>[/mobilizer/mobilizer/] is a servlet url - should redirect to ajp13
>[Fri Sep 19 14:19:23 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc
>check if [/mobilizer/mobilizer/] is points to the web-inf directory
>
>Any clues as to what I'm missing?
>  
>
IIS does listen on your requests and the dll is registered ok, but for 
some reason it can't map the request
to a worker (= a running tomcat instance). I think it is because you 
miss the worker.list as I described it
above.

>I haven't worked out the difference between jk and jk2, and which I
>should be using - I've seen different registry entries available for
>jk2, but I'd like to know whether or not the above *should* work first -
>and why (if at all) I should change to use jk2.
>  
>
I use jk2. Some people say it is not as stable as jk, but I have not 
encountered any problems with it yet.
My reason is that the old jk does not support MBeans, don't ask what it 
is more precisely, but my tomcat
will generate a (harmless) stacktrace at the beginning telling me this. 
Later when I shut my tomcat down,
the shutdown process takes a long time, probably waiting to shut down 
the jk module in tomcat, which does
not support being shut down like a MBean or something. Have you the same 
experience with jk?

>Any help gratefully received.
>Jon
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>


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