Score:0

Tomcat connector for Internet Information Server not working

nz flag

I am trying to configure a Internet Information Server to work with Tomcat and after following the steps in the website it's does not work.

What is worst, no way to document or to realize where the problem is. As appear in the website there are many steps to configure and the output should be "ok", but there is no way to diagnose where the problem is.

IIS

I have a windows Server 2012 R2 64 bits with the IIS that comes out with the installation. First question: ¿is it 32bit or 64bit??? For the rest of this question I will assume it's 64 bit.

Tomcat

Apache tomcat 10.0.18. Runs with java version 1.8.0_161. The server is configured to run as a service with logon as "Local System account". For the sake of this example, let's say is installed in %TOMCAT_HOME%.

AJP connector configured like this:

<Connector protocol="AJP/1.3"
           address="0.0.0.0"
           port="8009"
           secretRequired="false"
           xpoweredBy="true"/>

And confirmed it's working:

C:\>netstat -ab | find "8009"
  TCP    0.0.0.0:8009           THIS-SERVER:0        LISTENING
  TCP    [::]:8009              THIS-SERVER:0        LISTENING

ISAPI redirector for Micrsoft IIS

Downloaded from here. 64bit version. Installed under %TOMCAT_HOME%\isapi. Config files are:

ìsapi_redirect.properties:

#
# isapi_redirect.properties
#

extension_uri=/jakarta/isapi_redirect.dll

log_file=[server-home-removed]\\isapi\\isapi_redirect.log

log_level=debug

worker_file=[server-home-removed]\\isapi\\workers.properties

worker_mount_file=[server-home-removed]\\isapi\\uriworkermap.properties

workers.properties

#
# workers.properties
#

worker.list=tomcat01

worker.tomcat01.type=ajp13
worker.tomcat01.host=localhost
worker.tomcat01.port=8009

uriworkermap.properties

#
# uriworkermap.properties
#

/examples/*=tomcat01
/jakarta/*=tomcat01
/pwdReset/*=tomcat01

Configuration of the IIS tried

  1. I've given permission to the isapi directory as requested by the manual:

    icacls "%TOMCAT_HOME%\isapi" /grant "IIS APPPOOL\DefaultAppPool":(OI)(CI)M

    icacls "%TOMCAT_HOME%\isapi\isapi_redirect.dll" /grant "Everyone":RX

  2. I've created a f**** virtual directory (this is the third or fourth time I do) named "jakarta" and point it to the later directory (see below). The virtual directory has the "connect as" property configured as "application user (pass-through authentication)":

enter image description here

  1. Handler mapping configured as follows:

enter image description here

Access request restrictions configured as "none". But I've tried also with "execute" and nothing happens.

  1. ISAPI filter config:

enter image description here

The problem is that apparently having everything ok, the output I got when trying to connect to the virtual path is a 500 error if I use the ISAPI filter of 32 bits or 403 error if I use the 64 bit ISAPI filter. What am I doing wrong??? And what's more important, is there a way to diagnose that the different parts of this clusterfuck are correct, to check if the ISAPI filter is working, the AJP connector of tomcat is working, etc.???

enter image description here

Raul Luna avatar
nz flag
I've found that I have to configure DefaultAppPool "Enable 32-bit Applications" to False, but it seems that this not solves the problem.
Score:0
nz flag

Solved: if you read the updated reference of the connector you will find several things:

Note that in a 64 Bit environment - at least for IIS 7 - the used IIS Application Pool should have "Enable 32-bit Applications" set to "False". Otherwise the redirector will not be called and returns an http code 404. If you think, the 32bit version of isapi_redirect.dll would do the job instead, you will get an http code 500, because the library is not loadable into a 64 Bit IIS.

And I've completed the registry information prior to test again. Now it is working (requests appear in the tomcat side).

Lex Li avatar
vn flag
https://stackoverflow.com/tags/httpplatformhandler/info Microsoft only supports Java apps via HttpPlatformHandler.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.