• IIS Admin Blog

  • How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector

5th June 2009

How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector

posted in IIS 7.0, Tomcat |

Some time ago I wrote an installation guide for Apache Tomcat and IIS 6.0 using the JK 1.2 connector which you can find elsewhere on this blog. However, in response to a number of questions and comments on my blog and IIS forums I have decided to write a new installation guide for Apache Tomcat using the latest release of the JK 1.2 connector and IIS 7.0.

For the purposes of this guide I have used Java Runtime Version 6 Update 13, Apache Tomcat 6.0.18 and the JK 1.2.28 Connector.

You can download the software used in this guide here :

Java Version 6 Update 13
http://www.java.com/en/download/manual.jsp

Apache Tomcat
http://tomcat.apache.org/download-60.cgi

Tomcat Connectors (mod_jk) Downloads
http://tomcat.apache.org/download-connectors.cgi

Start by installing the Java runtime and accept the license agreement.

Then change the installation target folder to C:\Java and then click OK and wait while Java installs

Once you have installed Java you can start installing Tomcat. Double-click the apache-tomcat-6.0.18.exe file to invoke the Apache Tomcat Setup Wizard.

Choose a Custom installation and ensure that the Examples are selected as shown here. You wouldn’t necessarily want to install the sample applications in a production environment but we will be using them in this walkthrough so we need to install them.

Select to install Tomcat in the C:\Tomcat folder as shown here.

Once you have chosen the install location click Next.

Leave the default HTTP/1.1 Connector port set to 8080 and choose a password for the admin account.

The setup wizard should find your Java installation automatically.

Click install and wait while Tomcat setup completes.

When the installation is complete click Finish.

Pages: 1 2 3

This entry was posted on Friday, June 5th, 2009 at 2:34 pm and is filed under IIS 7.0, Tomcat. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 69 responses to “How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector”

Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

  1. 1 On June 16th, 2009, Ryan said:

    I have reviewed this document several times (How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector) and have configured my server exactly as laid out in this document. Everything is working except for the JK 1.2 connector. : {
    I have used Process Monitor from sysinternals.com and the ISAPI filter is not being hit. Also isapi_redirect.log file is not being created.

    Any additional advice that you can share?
    Thanks,
    Ryan

  2. 2 On June 18th, 2009, Paul Lynch said:

    Ryan,

    When you say the ISAPI filter is not being hit what exactly do you mean ? Is there an Access Denied error in Process Monitor ? What do you see in your browser ? Is it a 404 from IIS ? If so you may not have configured Tomcat correctly. Check that your Tomcat .properties files are present and correct.

    Regards,

    Paul Lynch

  3. 3 On June 22nd, 2009, Ryan said:

    Hi Paul
    Yes, I am receiving a 404 from IIS. I am not seeing isapi_redirect ever being accessed when watching file activity via Process Monitor.
    In previous versions of IIS you could see the green up arrow when an isapi filter loaded correctly. With IIS 7 this feature is not available. Using the command tasklist /m is* shows that the only module loaded is isapi.dll

    I can hit the tomcat instance directly by hitting the :8080 port. I receive a 404 file not found error when attempting to hit tomcat via the isapi_redirect and IIS7.

    Any assistance is much appreciated.
    Thanks,
    Ryan

  4. 4 On June 23rd, 2009, Ryan said:

    I was able to finally configure the modjk isapi filter to load for IIS 7.
    Addtional requirements that I had to make above and beyond what is in this document are.
    1. IIS 6 Metabase Compatibility is a required Role Service.
    2. Only works with the AMD64 isapi_redirect.dll…..even though I have Intel processors on my server.

  5. 5 On June 30th, 2009, Uko said:

    Ryan,
    Could U pls explain a little on what u mean by:
    “1. IIS 6 Metabase Compatibility is a required Role Service.
    2. Only works with the AMD64 isapi_redirect.dll…..even though I have Intel processors on my server.”

    I think I’m in the same situation.

  6. 6 On July 1st, 2009, Uko said:

    My configuration hasn’t worked yet!
    I’ve been getting:
    “No worker maps defined for C:\Tomcat\Tomcat 6.0\conf\uriworkermap.properties”
    when I check the log.

    Does anyone have an idea on how this can be fixed?

  7. 7 On July 1st, 2009, Kiran Prakash said:

    I ‘ve the “IIS 6 Metabase Compatibility” enabled. I am using amd64 bit, but still get the same error. Any idea?

  8. 8 On July 7th, 2009, Paul Lynch said:

    @Ryan,

    I’ve just checked my test server and I don’t have the IIS 6 Metabase Compatibility Role Service installed, so it can’t be required for Tomcat to run on IIS 7.0 I’m afraid.

    Also, the AMD64 name actually refers to the architecture of the chip not the name of the manufacturer, i.e AMD64 refers to 64-bit chips as opposed to Itanium chips.

    Regards,

    Paul Lynch

  9. 9 On July 25th, 2009, Florian Rhomberg said:

    Hi!
    I also used your How To to configure Tomcat on Windows 2008 x64. I did all steps but now I have a similar error like the others above. If I try to access tomcat on 8080 everything ist working. If I try to use the IIS 7.0 I get also 404.0 Error. If I use the command of Ryan the command line shows me isapi.dll as well as isapi_redirect.dll therefor it seems that both are loaded.
    Has someone an idea to fix it?

    Florian

  10. 10 On July 25th, 2009, Florian Rhomberg said:

    Hi!
    I got it work. Instead of the isapi_redirect.properties I inserted the values into the regitry following the steps provided on this page (Configuring the ISAPI Redirector): http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

    I do not know why it doesn´t work with properties file but however thank you for the tutorial!

    Florian

  11. 11 On July 28th, 2009, khairaz said:

    I followed the tutorial and having the same problem (404 error). But i solved it with make some changing in uniworkermap.properties. I added my web address examples /jsp-examples/*=wlb below the /examples/*=wlb and its worked perfectly.

  12. 12 On September 7th, 2009, Eric said:

    I followed the tutorial step by step to configure Tomcat 5.5 with IIS 7 on Windows Server 2008 Standard French Edition.
    Like many people here, I can hit the tomcat instance directly by hitting the :8080 port. I receive a 404.3 file not found error when attempting to hit tomcat via the isapi_redirect and IIS7 on standard 80 http port.
    I use the command of Ryan and the command line shows me isapi.dll as well as isapi_redirect.dll therefore it seems that both are loaded, but isapi_redirect.log file is never being created.
    Quick fix appreciated.

    Eric

  13. 13 On September 9th, 2009, Binesh said:

    Do you have any solution windows 2008 64 bit & tomcat 5.5 32 bit for configuration

  14. 14 On September 11th, 2009, John said:

    Hi Paul,

    I think I’ve figured out what the issues are that some people are having. If you are running a 32 bit version of Tomcat with a 32 bit JK connector on an x64 OS you have to configure the Application Pool -> Advanced Settings -> Enable 32 bit Applications = TRUE. You also need to ensure that the NTFS permissions are set for the user defined by Identity. You may want to add these to your post. I have documented it on my post at hidi.no-ip.org.

    -john

  15. 15 On September 22nd, 2009, himanshu said:

    thanks a ton! it worked just has to add properties value in registry.
    still need to figure out how to use Request.ServerVariables(”LOGON_USER”) from a asp page, get username in jsp page
    if anyone has example please forward me.

  16. 16 On October 7th, 2009, Alexander said:

    Binesh,

    you need to create a new application pool process, running in 32bit mode

  17. 17 On November 8th, 2009, Dennis said:

    I am just starting this process for both MS XpPro 64 and Windows 7 Ultimate 64. I will post my results as I go. I am wondering with 64 bit versions of Tomcat 5.x available and easy to install whay others are using 32 bit compiles under a 64 bit O.S.? Anyway, here I go!

  18. 18 On November 9th, 2009, Q said:

    I have win2k8 IIS7 Tomcat 5.5(shows up under WOW6432) have gone thru all steps and remedies but still not able to get any work between the redirector. tomcat working fine on its own. Have tried both registry option and properties option for connector config.

    tasklist /m is* doesnt show anything. Is there any other troubleshooting step I can do? seems like connector is not pickedup by IIS7 at all.

    I have tried disabling UAC didnt help.

  19. 19 On November 9th, 2009, Dennis said:

    Ok, I did everything perfectly as others have done (giggle) here is results from my first attempt. Just adding this to assist others who may be trying this and have gone down the same path as I did, the wrong path, right?

    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed

    Module IIS Web Core
    Notification Unknown
    Handler StaticFile
    Error Code 0×800700c1
    Requested URL http://localhost:80/servlets-examples/helloworld.html
    Physical Path C:\inetpub\wwwroot\servlets-examples\helloworld.html
    Logon Method Not yet determined
    Logon User Not yet determined

    Log file report: (goggledegook)
    #Software: Microsoft Internet Information Services 7.5
    #Version: 1.0
    #Date: 2009-11-09 12:49:36
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2009-11-09 12:49:36 ::1 GET /servlets-examples/helloworld.html - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+Win64;+x64;+Trident/4.0;+GTB6;+.NET+CLR+2.0.50727;+SLCC2;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET+CLR+3.0.30618;+.NET+CLR+3.5.21022;+Media+Center+PC+5.0;+SLCC1) 500 0 193 6267 493 202

    I will be going over all of the repair attempts other have applied now.
    Dennis in Camarillo California

  20. 20 On November 9th, 2009, Dennis said:

    Ok, I post here the three files the OP showed as screenshots which you could not cut and paste from. This is so you will not have to type in again. May be an error so check carefully.

    ===============================================

    #worker.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #
    worker.list=wlb,jkstatus,oreka
    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #
    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009
    #
    # Now define a load balancer
    #
    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w
    #
    # Define a status Worker
    #
    worker.jkstatus.type=status

    ======================================

    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [url]=[worker name]
    #

    /admin/*=wlb
    /manager=*=wlb
    /examples/*wlb
    /servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    #mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ==========================

    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    #Full path to the log file for the ISAPI redirector
    log_file=c:\tomcat\logs\isapi_redirect.log

    # Log level (debug, info, warn, error or trace)
    log_level=info

    #Full Path to the worker.properties file
    worker_file=c:\tomcat\conf\workers.properties

    # Full path to the uriworkermap.properties file
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

  21. 21 On November 9th, 2009, Dennis said:

    Ok, I changed the isapi dll file from isapi_redirect-1.2.28 IA64.dll to isapi_redirect-1.2.28 AMD64.dll as others had suggested above. Now error is different!

    HTTP Error 500.0 - Internal Server Error
    Calling GetFilterVersion on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed

    Detailed Error Information
    Module IIS Web Core
    Notification Unknown
    Handler StaticFile

    Error Code 0×80070002
    Requested URL http://localhost:80/servlets-examples/helloworld.html
    Physical Path C:\inetpub\wwwroot\servlets-examples\helloworld.html
    Logon Method Not yet determined
    Logon User Not yet determined

    - Before error was “unable to load” code 800700c1 and now it is 800770002 - “Calling GetFilterVersion on ISAPI filter failed”. Hmmm… seems like it now loads the isapi dll but doesn’t like it for some reason.

  22. 22 On December 10th, 2009, ds said:

    Dennis:

    I get the same HTTP error 500.00/0×80070002, did you find a solution to this?

  23. 23 On December 23rd, 2009, Florian said:

    Hi!
    I want to thank you for this Tutorial as well as for the tutorial of IIS6 it works great and it helped me to install several Tomcatserver in the past.

  24. 24 On January 8th, 2010, Chris Bedford-Gay said:

    Hi, excellent article.

    Worked for me perfectly until I tried to setup this is a site not the default. It worked up until the point I changed from using “localhost” to a host file mapped to “dev.rms” 127.0.0.1 with the IIS being setup to handle this.

    As soon as I tried this I received a error:

    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Program Files\Apache Software Foundation\Tomcat 5.5\ISAPI\isapi_redirect.dll” failed

    Does anyone have any ideas about this. I’m running 2008 Server x64 in 32bit compatability mode. I’ve 6 other sites running fine but no ideas about this error that seems to be specific to the ISAPI in Tomcat.

    Help please.

    Chris.

  25. 25 On January 11th, 2010, mohammad said:

    ok the solution for this error:
    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Program Files\Apache Software Foundation\Tomcat 5.5\ISAPI\isapi_redirect.dll” failed

    is:
    go to default application pool
    and to advance setting
    then to enable 32 bit application set it to true and test again.

  26. 26 On January 11th, 2010, Chris Bedford-Gay said:

    As soon as I do that i get a 404.0 file not found error. Most frustrating.

  27. 27 On January 21st, 2010, Steve Priestley said:

    It seems as though there are a couple of typos in the .properties files previously posted that lead to either a HTTP 500 error or a 404 error (depending upon which of the two files are read). Here are the amended versions that I’ve got running on my IIS 7.5 Windows 7 machine that seem to work fine:
    ———————–
    uriworkermap.properties
    ———————–
    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [URL]=[worker name]
    #

    /admin/*=wlb
    /manager/*=wlb
    /examples/*=wlb
    #/servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    # Mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ——————
    workers.properties
    ——————
    # workers.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #

    worker.list=wlb,jkstatus

    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #

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

    #
    # Now define a load balancer
    #

    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w

    #
    # Define a status Worker
    #

    worker.jkstatus.type=status
    ———————–

    No registry hacking required either….

  28. 28 On February 5th, 2010, RAM said:

    Hi All,

    I am able to access “hello world” in the above document. i want it to be accessed only from IIS using port 80 so the request will be handled by IIS.

    I dont want the “helloworld” to be accessed by “localhost:8080/…/ ../helloworldexample”

    I want that to be accessed only by “localhost/…/…/helloworldexample”

    can Any one help me on the same.

    Thanks

  29. 29 On February 10th, 2010, Pieter Degraeuwe said:

    Hi,

    I followed the steps just like you nicely described.
    It works -almost-.

    I can see in de isapi_rederect.log the following:

    (I skipped the beginning)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 0: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 1: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 2: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 3: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker jkstatus
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ’status’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 4: jkstatus of type status (6)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (171): uri map dump after extension stripping: index=0 file=’c:\java\tomcats\conf\uriworkermap.properties’ reject_unsafe=0 reload=60 modified=1265835848 checked=1265836550
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (176): generation 1: size=5 nosize=0 capacity=8
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/servlets-examples/* worker=wlb context=/servlets-examples/* source=uriworkermap type=Wildchar len=20
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #1: uri=/examples/* worker=wlb context=/examples/* source=uriworkermap type=Wildchar len=11
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #2: uri=/manager/* worker=wlb context=/manager/* source=uriworkermap type=Wildchar len=10
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #3: uri=/admin/* worker=wlb context=/admin/* source=uriworkermap type=Wildchar len=8
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #4: uri=/jkmanager worker=jkstatus context=/jkmanager source=uriworkermap type=Exact len=10
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (482): Switching uri worker map from index 0 to index 1
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [info] jk_isapi_plugin.c (2572): Jakarta/ISAPI/isapi_redirector/1.2.28 initialized
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1841): Filter started
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (1036): Attempting to map URI ‘/localhost/jkmanager’ from 5 maps
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/servlets-examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/manager/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/admin/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/jkmanager=jkstatus’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/servlets-examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/manager/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/admin/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/jkmanager=jkstatus’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (873): Found an exact match ‘/jkmanager=jkstatus’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1922): check if [/jkmanager] points to the web-inf directory
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1938): [/jkmanager] is a servlet url - should redirect to jkstatus
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1978): fowarding escaped URI [/jkmanager]

    –> But I still get a 404. So it seems that i can’t find the tomcat to forward to.

    netstat -a shows that my tomcat IS listening on port 8009.

    Any suggestions ?

  30. 30 On February 11th, 2010, Paul Lynch said:

    @Pieter,

    What is the sub-status code in your IIS log file ?

    Regards,

    Paul Lynch

  31. 31 On February 11th, 2010, Pieter Degraeuwe said:

    I don’t know if this might help , but this I could find in the log….

    (Thanky you VERY much for your reply, since I’m desperate…)

    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:34:57
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken

  32. 32 On February 11th, 2010, Pieter Degraeuwe said:

    @Paul,

    I think I lost some lines… here is a bit more…

    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:29:17
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2010-02-11 11:29:17 ::1 GET /examples/jsp/jsp2/el/basic-arithmetic.jsp - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 143
    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:34:57
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2010-02-11 11:34:57 ::1 GET /examples/jsp/jsp2/el/basic-arithmetic.jsp - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 147

  33. 33 On February 11th, 2010, Paul Lynch said:

    @Pieter,

    Your log file appears to indicate a standard 404 error which suggests that IIS is not handing off the requests to the ISAPI filter. IIS is looking for a resource (in this case /examples/jsp/jsp2/el/basic-arithmetic.jsp) and can’t find it so returns a 404

    The only thing I can suggest is that the Tomcat connector isn’t installed and/or configured correctly because it isn’t intercepting the requests properly.

    Regards,

    Paul Lynch

  34. 34 On February 11th, 2010, Pieter Degraeuwe said:

    Thanks again for your help.

    When you say tomcat connector, you mean the isapi_rederect (jk), or the thing that listens on port 8009 ?

    Or, am I completely missing the real tomcat connector? (and i forgot to install it?)

    goal is that I have a set of a few tomcats, that are grouped by the one IIS.
    the urimapping.properties contains the config to decide which request go to worker1 and which go to worker2?

    Does have iis another way of configuring this? (forwarding), since I might need this as well for my subversion repositories.

    Thanks

  35. 35 On February 11th, 2010, Paul Lynch said:

    Pieter,

    Yes I mean the ISAPI filter. It has to be configured and enabled in IIS in order to be able to hand off requests to Tomcat.

    Regards,

    Paul Lynch

  36. 36 On February 24th, 2010, Semax said:

    Hullos`

    thanx for the tutorial. I have followed it and everything works fine but just one problem. My application appears very well when am accessing it from the remote server and ip address i used but isn`t accesible from other computers/ip on the internet. i.e.
    http://trackafrica.com is accessible even from other ip addresses, but http://trackafrica:8080 (and http://trackafrica:8080/track ) isn`t accessible from other ip addresses apart from the one i used.

    What could i have missed or what i am i supposed to do to get this done.

    Will be happy to receive a response
    regards

  37. 37 On February 25th, 2010, Semakula said:

    I have installed a java application using tomcat 6 and iis7, ISAPI connector jk 1.2.xx.

    The app is working fine on the remote server i used but doesn`t display when accessed from other computers on the internet. i.e. http://trackafrica.com displays well both on the server and other computers, but http://trackafrica.com:8080 (http://trackafrica.com:8080/track/Track) won`t display when accessed from other computers on internet.

    I am puzzled as to why this is like this.

    I will be glad to receive a clue or solution to this.

    Thanx

  38. 38 On February 25th, 2010, Theodore said:

    Hello everyone, I too get a 500 error: even in the Default Site (http://localhost)

    I am running on a Windows Server 2008 x64 virtual machine with IIS 7.5.

    All in all, I did the following:
    1. Got the amd64 filter, renamed it properly and unblocked it.
    2. Created workers.properties and uriworkermap.properties
    3. Tried the isapi_redirect.properties thing, the filter could not be loaded so:
    3.1 Tried the registry thing instead
    4. Installed IIS with CGI, ISAPI Extensions and ISAPI Filters
    5. Created virtual directory and tested the connection with the default user (did not work, so I had to declare the admin passwd which passed the test)
    6. In that virtual dir, edited the handler mapping
    7. Added the isapi filter to the default web site
    8. Added the isapi and cgi restriction things pointing to the dll

    After restarting the server I get nothing more than:

    HTTP Error 500.0 - Internal Server Error
    The page cannot be displayed because an internal server error has occurred. Detailed Error Information
    Module IsapiFilterModule
    Notification AuthenticateRequest
    Handler StaticFile
    Error Code 0×80070001
    Requested URL http://localhost:80/
    Physical Path C:\inetpub\wwwroot
    Logon Method Anonymous
    Logon User Anonymous

    Since I have been messing with this for more than a week now, I would like to know:

    Is there ANYONE that has set this up successfully?

  39. 39 On February 25th, 2010, Theodore said:

    Just to be complete regarding my previous post, the registry entries are read fine, the log file is created ok and shows no errors whatsoever…

    I feel inclined to take this personally, it’s a pity that there is no definite answer in the web for this issue. If there is someone that knows something chip in guys so that we get this straightened out once and for all, this would help a lot of people out there I think…

  40. 40 On February 25th, 2010, Theodore said:

    Follow-up just to note that if I change the 32-bit compatibility thing to True I do see the welcome screen in localhost but then my site (that resides on a remote server) returns a 404 error (I’ve also read this in Chris’ comment).

  41. 41 On February 27th, 2010, Larry said:

    hi,

    i replace isapi_redirect.dll with AMD, and it worked!
    no need to enable “the 32-bit compatibility”
    “Metabase Compatibility with IIS 7.0″ is installed, but i don’t know if it related with the issues.

  42. 42 On March 1st, 2010, daniel said:

    if you get 500 GetFilterVersion - first of all check the names/extentions of your properties files.

  43. 43 On March 5th, 2010, som said:

    Thanks, good rewiew everything is working.

    Just a question:
    Can I increase java heap memory size?
    If yes, How can i do it?

  44. 44 On March 8th, 2010, Theodore said:

    Guys, since I see that this is working for some of you, can somebody post a worklog here in order to compare and see what causes the problem on my installation?

    TIA.

  45. 45 On March 9th, 2010, Brus-Per said:

    I just wanted to say thanks for this excellent tutorial. The only problem I had was with the (almost) famous AMD64 isapi_redirect.dll. Probably, a lot of the problems reflected above arises from misinterpreting the folder structure under /dist/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.30. Once again, thank you for sharing this information!

  46. 46 On March 9th, 2010, Brus-Per said:

    BTW, I think there is a typo in the posting from Dennis on November 9th.

    The posting reads:
    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    The correct extension_uri should probably be:
    extension_uri=/jakarta/isapi_redirect.dll (the first “r” in jakarta should not be there)

  47. 47 On March 9th, 2010, David Ha said:

    I got IIS re-direct to Tomcat just fine, but problem arise when I try to work with SSL. For some reasons, the redirect change the url from https://domainname.. to http://Domainname..:443

    Server; Windows Server 2008 x64
    Tomcat connector: 1.28

    on my W2K3 server - it works beautifully.

    Any helps is appreciated.

  48. 48 On March 17th, 2010, Ali Alan said:

    all of works but in my project there are 3 domains in same application folder

    webapps/folder1/app1/
    webapps/folder1/app2/
    webapps/folder1/app3/

    is there any way show URL without folder name.
    Ex.

    http://www.domain1.com/folder1/app1/index.jsp — work
    i want to work http://www.domain1.com/index.jsp

    http://www.domain2.com/folder1/app2/index.jsp — work
    i want to work http://www.domain2.com/index.jsp

  49. 49 On March 21st, 2010, Kev said:

    Nice Blog, I have used it as a template for my own system.
    I have Server 2008 standard running IIS7 and Tomcat 6
    IIS has been running well for a while and a few ASP.Net web sites are hosted there, I am now trying to get a Java site running as well.
    The Domain (www.spicetheworld.eu) points correctly to my server and currently shows my IIS Servers default web page.
    I have followed your instructions and I am currently at this point -
    http://www.spicetheworld.eu/ reaches IIS but does not foward to Tomcat
    Over the Server both http://localhost:8080/spicetheworld/ and http://localhost/spicetheworld/ show the installed site correctly.

    I suspect the answer to this is simple so how do I get IIS to foward incoming requests to view the website to Tomcat please?

    This is my workers.properties file
    worker.list=wlb,jkstatus
    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009
    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w
    worker.jkstatus.type=status

    This is my uriworkermap.properties file
    /admin/*=wlb
    /manager/*=wlb
    /spicetheworld/*=wlb
    /jkmanager=jkstatus

    This is my isapi_redirect.properties file
    extension_uri=/jakarta/isapi_redirect.dll
    log_file=c:\tomcat\logs\isapi_redirect.log
    log_level=info
    worker_file=c:\tomcat\conf\workers.properties
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

    In IIS I have configured the Default Web site as in this Blogg and I have not added spicetheworld.eu as a web site (is this correc?)

    Thanks in advance for any advise.

    Regards

    Kevin

  50. 50 On April 13th, 2010, Mark said:

    I am using the 64 bit Windows 2008, the 64 bit 1.2.28 connector, the 64 bit tomcat 6.0.26 running on 64 bit jdk 1.6.0_19. I followed the instructions and had same problem most were experiencing. That is that everything worked except the connector. Using the tasklist utility also showed that the isapi_redirect.dll was not running, and the log file was not getting created.

    My solution suggested that isapi_redirect.dll did not have correct access rights to the directory containing the config file nor to the directory containing the log file. This completely prevented to connector from loading. Although I don’t understand why this would be so since both IIS and Tomcat are running as System and they don’t have any problems reading or writing files.

    Maybe this is why the setup started working for some when they used the registry settings for the config info since this did not require access rights to a disk resource.

    My solution was to give Everyone Modify level rights to the directory with the isapi_redirect.properties file and the directory which is the target of the log file.

  51. 51 On April 27th, 2010, Steve said:

    Thanks for this blog, it was very helpful.

    I am testing this on Windows 7 Enterprise (moving it to Server soon), IIS 7.5.7600.16385, Tomcat 6.0.26 and isapi_redirect.dll version 1.2.30.

    After following the steps and making the changes to properties files so that they end up like this (AND RESTARTING THE TOMCAT SERVICE AND IIS!) everything worked beautifully:

    ———————–
    uriworkermap.properties
    ———————–
    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [URL]=[worker name]
    #

    /admin/*=wlb
    /manager/*=wlb
    /examples/*=wlb
    /jsp-examples/*=wlb
    #/servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    # Mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ——————
    workers.properties
    ——————
    # workers.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #

    worker.list=wlb,jkstatus

    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #

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

    #
    # Now define a load balancer
    #

    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w

    #
    # Define a status Worker
    #

    worker.jkstatus.type=status
    ———————–
    ==========================

    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    #Full path to the log file for the ISAPI redirector
    log_file=c:\tomcat\logs\isapi_redirect.log

    # Log level (debug, info, warn, error or trace)
    log_level=info

    #Full Path to the worker.properties file
    worker_file=c:\tomcat\conf\workers.properties

    # Full path to the uriworkermap.properties file
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

  52. 52 On April 30th, 2010, Joe said:

    Thank you, I was racking my brains out for three days and nights
    All I was missing the last step….

    thanks again!

  53. 53 On June 12th, 2010, Mikael said:

    Hi

    I have followed the instructions and i now have a working IIS7 - Tomcat installation on a Win2008 server.

    But i have one problem that is hard to see any logic behind.

    If i run a web browser locally on the server all .jspx pages are shown correctly, BUT when i use an external browser all pages containing forms that require information gets a “500 - Internal server error.There is a problem with the resource you are looking for, and it cannot be displayed.”, the errorpage shows up when i leave the fields in the forms empty and click “log in”, or if i type in wrong information, for example a non existent user in the user field.

    It looks like IIS lacks information on how to call the right page when there is no or wrong info missing in fields.

  54. 54 On June 15th, 2010, JB said:

    Hi,
    I’ve configured IIS7 and Tomcat6 successfully, being able to see servlets i’ve made on both localhost:8080 and localhost:80.
    Now i want to add the servlets to my website.
    I tried following the same steps, except making a virtual directory under my website rather than “default web site”, but i get 404 file not found errors.
    How do i go about doing this?
    Thanks

  55. 55 On June 18th, 2010, Brijesh said:

    I tried the same steps mentioned in the tutorial, but no success.

    both(IIS and apache) are working independently, but not getting redirected to apache from IIS.

    getting 404 and displaying path of ISS home directory.

  56. 56 On June 28th, 2010, Steele said:

    Just like Brijesh, I followed all steps. Win 2008, IIS 7.5 and tomcat 6 on another machine. I just get 404 error, no log file gets generated which makes me believe that IIS is not even picking up the DLL. Not sure what to fo.

  57. 57 On June 29th, 2010, Brijesh said:

    I tried to configure the same in the virtual enviornment, it worked but on real server,
    it still giving me 404.

    On real server when i do “tasklist /m is*”
    it gives me
    Image Name PID Modules
    ========================= ======== ==========================
    inetinfo.exe 504 ISATQ.dll, iscomlog.dll
    InetMgr.exe 6988 ISymWrapper.dll
    vds.exe 8700 iscsidsc.dll, ISCSIUM.dll

    and when i execute the same command on virtual server

    it gives me

    Image Name PID Modules
    ========================= ======== ===============================
    w3wp.exe 2424 isapi.dll, isapi_redirect.dll

    i am not sure what i am missing, i have double checked all the steps still no success yet.

  58. 58 On June 29th, 2010, Steele said:

    Finally got it to work. I reverted the IIS install and tried again. This time it worked. The only thing I did differently was when you named your filter tomcat, I named mine modjk which didn’t work. Second time around I named it tomcat and it worked. Weird.

  59. 59 On June 30th, 2010, Sonu said:

    I integrate tomcat 6 with iis 7 and follow the same steps.

    Every thing is working fine for localhost and default website.

    I want to add more than 3 website in tomcat and want to run on tomcat but as i add new website to iis and follow same steps as for default one all html pages are accessed but JSP and servlets portion is not executed by tomcat.

    Error Shown is

    HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    Kindly tell where to add and what to add so that multiple website can run on tomcat and iis.

  60. 60 On July 9th, 2010, venkatesh mani said:

    hello sir,

    when i installed the tomcat i not gave user name password, when i entered in to the tomcat fot the login i gave the default user name password. and also i uncommented the user name password. now i am getting “page cannot be displayed” problem. please solve my probelm it is very urgency

  61. 61 On August 3rd, 2010, Ger said:

    Hi

    Excellent work on the instructions, thank you. I’m getting the following error “HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed”

    IIS 7 on Windows 2006 64 Bit on VM.
    Tomcat 6 on a remote machine.

    Any suggestions appreciated. Also do I need to open port 8009 for teh work thread. There is a firewall between IIS and Tomcat.

  62. 62 On August 3rd, 2010, Ger said:

    Quick update. I found I needed the AMD64 ISAPI DLL which resolved the issue with the ISAPI filter not loading. I now assume all I need to do is get port 8009 open?

  63. 63 On August 11th, 2010, Elrinth said:

    tasklist /m is* gives me nothing. it’s not even using the isapi :(

  64. 64 On August 12th, 2010, Elrinth said:

    Windows 7 Pro 64bit
    IIS 7.5
    .NET 2.0 or .NET 4.0
    Tested with 32bit, 64bit amd, 64bit intel version of isapi_redirect.dll
    Tested with/without enabling 32bit (disabling results in error 500, enabling results in error 404)
    Writing something wrong in any of the config files results in a created isapi_redirect.log inside the log folder telling me what’s wrong.
    Still 404

    How to fix?
    I’ve tried everything above.

  65. 65 On August 12th, 2010, Paul Lynch said:

    @Elrinth,

    I’m looking into the issues with 64-bit builds at the moment. A lot of people seem to be having problems with Tomcat on a 64-bit platform.

    Regards,

  66. 66 On August 13th, 2010, Stefan said:

    Finally get IIS to talk to tomcat. I am using IIS 7.5, tomcat 6.0.29 and isapi-redirect-1.2.30.dll. The OS is 64-bits. I use all amd64 bit version to match the OS. When 32-bits version was used, I was getting a 404.3 error. I also stupidly did not follow the instruction above to remove the version from my dll to isapi-redirect.dll. I got a 505 status code, with error message stating something wrong when calling getFilterVer(). At this point, tasklist /m is* shows that the isapi-redirect.dll is loaded and the redirect.log shows up, but the browser prompt me to save the file when testing. This is fixed by fixing the ISAPI-dll Handler Mapping of the site. The Executable was pointing to the 32-bit dll. After switching back to the 64 bit dll and checking Executable under the Access tab in the dialog shown after Request Restriction is clicked, the test page finally work.

    I also manage to get the 32-bit dll to work by changing the Application Pool Advanced Setting Eable 32-bit Application to true.

  67. 67 On August 17th, 2010, Xabier said:

    I was going through this nice manual and thought I would never make it work.

    Despite of some problems with access rights I got to have something written on the isapi.log. This was the first step to realise that I had some kind of problem as the 8009 port was listening and the Isapi.log was throwing a “61″ error (http 503).

    Finally, I uncommented the “/servlets-examples/*=wlb” on the uriworker.properties and everything worked.

    The config that I got to work is for a virtual machine with “Intels” but still AMD architecture. Therefore:
    > isapi_redirect for AMD 1.2.30 (I renamed the original file to “isapi_redirect.dll”)
    > Tomcat:5.5.30
    > JRE 1.6.0_21-b07
    > Win2008 + IIS 7.0

  68. 68 On August 17th, 2010, Xabier said:

    Trying further I realised about the main failure: click Native instalation.

    After couple of tests, I found out that if I don’t install the “Native” then it works.

    Best luck!

  69. 69 On August 19th, 2010, Nuno Belo said:

    Thank you for this manual. I had already done this for IIS6, but Microsoft changed the way this was done in IIS7. It was realy helpfull.

    IISAdmin is Bookmarked :-)

    Regards

Leave a Reply

  • Calendar

  • September 2010
    M T W T F S S
    « Feb    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930