PDA

View Full Version : Problems with IIS and Tomcat


despy
01-06-2005, 09:35 AM
Hi,

I'd really appreciate some help after staring at this all day. I'm starting to go crazy. :)

I want to run Laszlo through IIS via Tomcat. They're all installed and working individually but don't seem to want to work together. Here's the versions

IIS 6
Laszlo 2.2.1
Tomcat 5.0.28
Java 1.4.2

I've installed the ISAPI connector between IIS and Tomcat and created a virutal directory in IIS and it works. The Laszlo examples work when called from Tomcat (so http://localhost:8080) but not when called via IIS. The jsp-examples work when called from Tomcat and via IIS so I know the connector is working.

However, whenever I try to call a Laszlo application through IIS I get "The system cannot find the file specified." It's not a standard 404 error from IIS or Tomcat though.

To allow IIS to pass thru jsp to Tomcat I have a workers2.properties file which has

[uri:/jsp-examples/*]
info=JSP examples, map requests for all JSP pages to Tomcat.
context=/jsp-examples

but when I add a similar config entry for Laszlo, nothing changes.

Does anybody know where the 'he system cannot find the file specified' is coming from or where I can look to find out more. I'm out of ideas so any help here would be appreciated.

Thanks

d~l
01-06-2005, 12:02 PM
but when I add a similar config entry for Laszlo, nothing changes.

you don't say what additional uri settings you have configured for lps .. here is a cutting from my workers2.properties .. compare with your lps-2.2.1 entry .. ("admin" and "manager" are optional uri's you might not wish to connect via IIS)..


[uri:/admin/*]
info=Tomcat HTML based administration web application.
context=/admin
debug=0

[uri:/manager/*]
info=A scriptable management web application for the Tomcat Web
Server.
context=/manager

[uri:/jsp-examples/*]
info=JSP 2.0 examples, map requests for all jsp pages to Tomcat
context=/jsp-examples

[uri:/servlets-examples/*]
info=Servlet 2.4 examples, map requests for all servlets-examples pages to Tomcat
context=/servlets-examples

[uri:/lps-2.2.1/*]
info=Laszlo 2.2.1, map requests for all lps pages to Tomcat
context=/lps-2.2.1


also .. check that you have these context files setup correctly in %TOMCAT_HOME%\conf\Catalina\localhost\

one context file for each webapp ..


c:\tomcat5\conf\Catalina\localhost\
>admin.xml
>balancer.xml
>jsp-examples.xml
>lps-2.2.1.xml
>manage.xml
>servlets-examples.xml


here is my a typical lps-2.2.1.xml context file ..


<?xml version='1.0' encoding='utf-8'?>
<!-- Context configuration file for the LPS-2.2.1 -->

<Context path="/lps-2.2.1"
docBase="c:\tomcat5\webapps\lps-2.2.1"
debug="0"
privileged="true"
reloadable="true"
useNaming="true">


<!-- Uncomment this Valve to limit access to the app to localhost for obvious security reasons.
Allow may be a comma-separated list of hosts (or even regular expressions).

<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>
-->

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_lps-2.2.1_log." suffix=".txt"
timestamp="true"/>

</Context>

despy
01-06-2005, 03:20 PM
Thanks for your response d~l. I'd missed the lps-2.2.1.xml file but after adding this I still get the same error message, 'The system cannot find the file specified.'

Checking the Laszlo log I can see normal activity in there when I run apps thru tomcat at localhost:8080 but nothing is in there when I run thru iis at localhost.

I double checked the workers2.properties file and I think it looks correct. I removed the uri section for /admin and got a different error message to cannot find the file so I don't think the error is happening here. The jsp-examples and servlets-examples are both running fine.

In the registry I have the serverRoot set to %TOMCAT_HOME%\webapps. Is this the correct place?

d~l
01-07-2005, 02:56 AM
You seem to be 90% there is you can run jsp-examples .. through IIS ..

check your IIS configuration against this tutorial (http://www.jspwiki.org/attach?page=AttachmentsDemo%2Fiis6-Tomcat5-JK2.pdf).

A useful utility for tracking down these "file not found" errors is filemon from [url=http://www.sysinternals.com[/url].

Setup the include field to have just tomcat as the keyword

and the exclude field must define the background processes to be suppressed (e.g. EXPLORE) so you only see the IIS/Apache file accesses. Keywords separated by semi-colons.

Another useful tool at same site in ProcExp. Look for Apache running process in this tool.

...

Your registry setting should not be %TOMCAT_HOME%\webapps

The Tomcat startup.bat should set this up and %CATALINA_HOME% will point to your tomcat installation

e.g. "c:\tomcat5"

___________________________

p.s. .. I forgot to mention uriworkermap.properties .. in %TOMCAT_HOME%\conf\

should have a line like this ..

/lps-2.2.1/*=ajp13

despy
01-07-2005, 01:02 PM
Thanks again d~l. Still no further forward. The tutorial is the one I set up IIS with and it works for jsp-examples.

Running filemon the only missing files it reports are things like tomcat-docs.xml in the localhost folder which is correct because I haven't set those up.

Where should the serverRoot key in the registry point too?

Thanks

d~l
01-08-2005, 02:05 AM
My Tomcat installation is at c:\tomcat5\

Here is a copy of my registry settings from regedit:-

[HKEY_LOCAL_MACHINE
> SOFTWARE
> Apache Software Foundation
> Jakarta Isapi Redirector
> 2.0

"workersFile"="c:\Tomcat5\conf\workers2.properties"
"extensionUri"="/jakarta/isapi_redirector2.dll"
"logLevel"="debug"
"serverRoot"="c:\Tomcat5"

________________________________________________

note: I have mod_jk2 installed .. not mod_jk.
________________________________________________

also .. check the docbase in c:\tomcat5\conf\Catalina\localhost\lps-2.2.1.xml

as in my lps-2.2.1.xml posted earlier in this thread

note the docbase setting (amend to your installation path for Tomcat 5).


<?xml version='1.0' encoding='utf-8'?>
<!-- Context configuration file for the LPS-2.2.1-->

<Context path="/lps-2.2.1"
docBase="c:\tomcat5\webapps\lps-2.2.1"
debug="0"
privileged="true"
reloadable="true"
useNaming="true">

.... etc.