[Announce] Enhanced ISAPI Redirector + Tomcat Connector Binaries

2007-12-20 Thread Tim Whittington
Hi all

We've been using Tomcat and Tomcat Connectors in our company products for 
almost 10 years now, and it's a very important part of our technology stack.
Over those years we've contributed some enhancements and fixes to the IIS 
connector/ISAPI Redirector, and most of these have been accepted back into 
the trunk.
There's one in particular that we feel is very useful that hasn't been 
accepted though, which is the addition of chunked encoding support to the 
ISAPI Redirector, which allows IIS to use HTTP keep alives between the 
browser and IIS - we've found this has major scalability benefits on high 
transaction volume sites.
  
http://issues.apache.org/bugzilla/show_bug.cgi?id=35297 tracks the proposed 
patch for this, but it's been waiting for 2+ years for a 1.3 development 
branch to open to make it available to the wider community.
We feel this is an important enough feature for us to maintain internally 
and use in many production sites over the years, and we think other people 
will find it useful, so we've now taken the step of making it available to 
the community at large in source + binary form on SourceForge. Our patches 
are all APLv2, as per the Tomcat source, and are available in the 
SourceForge SVN repo.

https://sourceforge.net/projects/timsjk/ is the SF site.

We've also taken the opportunity to make available the compiled binaries we 
produce in-house for many platforms (we support a large number), and I hope 
this is of use to the community at large. You'll find binaries for Apache 
2.0, 2.0-prefork, 2.2, 2.2-prefork and IIS 5/6 on AIX PPC64, HP-UX PA-RISC2, 
HP-UX IA64, Linux-x86, Linux-x64,
Windows x86 and Window x64 (with some obvious exceptions) available from the 
SourceForge project download page. We've provided builds of our enhanced 
ISAPI redirector as well as an unpatched ISAPI redirector.

This isn't a fork of Tomcat Connectors - the work the Tomcat devs are doing 
on Tomcat Connectors in recent times, in particular Rainer and Mladen, is 
great, and we continue to value, use and support it - apart from the IIS 
connector we use unpatched mod_jk connectors everywhere. If/when the 1.3 
development branch opens and the chunked encoding support is added to the 
main trunk we'll wind up our patches and see if there's a better way to 
distribute the binaries.

If you're going to try out or use the enhanced ISAPI redirector, please be 
responsible when reporting bugs and test against the unpatched version 
before logging them against Tomcat. If they turn out to be due to our 
patches, then report them on the SF project.

cheers
tim



RE: [Announce] Enhanced ISAPI Redirector + Tomcat Connector Binaries (and IIS 6.0)

2008-01-02 Thread Tim Whittington
I haven't had to do anything special when using the ISAPI Redirectory on IIS 
6 (apart from the usual Web Services extension magic), so it definitely 
works in the default worker process isolation mode.
My patched version does utilise Windows 2003 Server specific APIs when used 
on IIS 6 (to do optimised network writes of chunk encoded blocks), but 
that's auto-detected.

I haven't had any experience using the redirector in IIS 5 isolation mode, 
but I can't imagine why it wouldn't work - the ISAPI redirector doesn't do 
anything too esoteric with the IIS APIs, and the same builds run in IIS 5 
fine.

For those that are interested, the modes are described at 
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/ed3c22ba-39fc-4332-bdb7-a0d9c76e4355.mspx?mfr=true

tim

-Original Message-
From: Travis Haagen [mailto:[EMAIL PROTECTED]
Sent: Saturday, 22 December 2007 1:30 p.m.
To: Tomcat Users List
Subject: Re: [Announce] Enhanced ISAPI Redirector + Tomcat Connector 
Binaries (and IIS 6.0)

Tim,

Have you had experience testing your version of the ISAPI redirector DLL 
with IIS 6.0? What specific IIS configuration settings take the fullest 
advantage of the persistent HTTP connections that your version offers?

Also, I've seen zero discussion thus far on whether version 1.2.25 of the 
DLL should work with IIS in worker process isolation mode or in IIS 5 
isolation mode. Do you have any insight on this? Anyone have any insight on 
this? :)

-Travis Haagen



----- Original Message -
From: "Tim Whittington" <[EMAIL PROTECTED]>
To: ; <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2007 5:20 PM
Subject: [Announce] Enhanced ISAPI Redirector + Tomcat Connector Binaries


> Hi all
>
> We've been using Tomcat and Tomcat Connectors in our company products for
> almost 10 years now, and it's a very important part of our technology
stack.
> Over those years we've contributed some enhancements and fixes to the IIS
> connector/ISAPI Redirector, and most of these have been accepted back into
> the trunk.
> There's one in particular that we feel is very useful that hasn't been
> accepted though, which is the addition of chunked encoding support to the
> ISAPI Redirector, which allows IIS to use HTTP keep alives between the
> browser and IIS - we've found this has major scalability benefits on high
> transaction volume sites.
>  <http://issues.apache.org/bugzilla/show_bug.cgi?id=35297>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=35297 tracks the
proposed
> patch for this, but it's been waiting for 2+ years for a 1.3 development
> branch to open to make it available to the wider community.
> We feel this is an important enough feature for us to maintain internally
> and use in many production sites over the years, and we think other people
> will find it useful, so we've now taken the step of making it available to
> the community at large in source + binary form on SourceForge. Our patches
> are all APLv2, as per the Tomcat source, and are available in the
> SourceForge SVN repo.
>
> https://sourceforge.net/projects/timsjk/ is the SF site.
>
> We've also taken the opportunity to make available the compiled binaries
we
> produce in-house for many platforms (we support a large number), and I
hope
> this is of use to the community at large. You'll find binaries for Apache
> 2.0, 2.0-prefork, 2.2, 2.2-prefork and IIS 5/6 on AIX PPC64, HP-UX
PA-RISC2,
> HP-UX IA64, Linux-x86, Linux-x64,
> Windows x86 and Window x64 (with some obvious exceptions) available from
the
> SourceForge project download page. We've provided builds of our enhanced
> ISAPI redirector as well as an unpatched ISAPI redirector.
>
> This isn't a fork of Tomcat Connectors - the work the Tomcat devs are
doing
> on Tomcat Connectors in recent times, in particular Rainer and Mladen, is
> great, and we continue to value, use and support it - apart from the IIS
> connector we use unpatched mod_jk connectors everywhere. If/when the 1.3
> development branch opens and the chunked encoding support is added to the
> main trunk we'll wind up our patches and see if there's a better way to
> distribute the binaries.
>
> If you're going to try out or use the enhanced ISAPI redirector, please be
> responsible when reporting bugs and test against the unpatched version
> before logging them against Tomcat. If they turn out to be due to our
> patches, then report them on the SF project.
>
> cheers
> tim
>
>



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [ANN] Apache Tomcat JK 1.2.26 Web Server Connector released

2008-01-02 Thread Tim Whittington
Binary builds of 1.2.26 for various platforms are available now from
http://sourceforge.net/projects/timsjk/
These include builds of a patched IIS 5/6 ISAPI Redirector that support
HTTP 1.1 chunked encoding (and thus keep-alives on dynamic content).

cheers
tim


-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 25 December 2007 4:36 a.m.
To: users@tomcat.apache.org; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [ANN] Apache Tomcat JK 1.2.26 Web Server Connector released

The Apache Tomcat team is pleased to announce the immediate availability
of version 1.2.26 of the Apache Tomcat Connectors.

It contains connectors, which allow a web server such as Apache HTTPD,
Microsoft IIS and Sun Web Server to act as a front end to the Tomcat web
application server.

This version contains a few enhancements and fixes a number of minor bugs
of the previous versions.

See http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html
for a complete list of changes.

Source distribtions can be downloaded from an Apache Software Foundation
mirror at:

http://tomcat.apache.org/download-connectors.cgi

Binary distributions for a number of different operating systems and web
servers can be downloaded from an Apache Software Foundation mirror at:

http://tomcat.apache.org/download-connectors.cgi

Syncing the release to the download mirrors might take up to 48 hours.

Documentation for using Apache Tomcat Connectors can be found at:

http://tomcat.apache.org/connectors-doc/

Thank you,

-- The Apache Tomcat Team

P.S.: Merry Christmas!



-
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Content_Length Problem

2008-01-05 Thread Tim Whittington
>From what I can tell there's nothing (technically) wrong with what Tomcat
+ ISAPI Redirector is doing here.

What's actually happening here is that Tomcat internally only provides a
Content-Length header if it can determine the length of the content easily
(e.g. it's a static file) or the Servlet generating dynamic content
provides one itself.
Any other response content is just written out to whatever connector
(HTTP/AJP) is being used. If it's via the HTTP connector, then chunk
encoding is automatically provided. Likewise with the AJP connector and
mod_jk in Apache - chunk encoding is automatically provided by Apache for
all responses that would benefit from it (mod_jk doesn't do anything
special to achieve this).
IIS being the braindead poor cousin is not so accomodating, as it requires
any ISAPI extension to not only tell it that it would like to use
persistent HTTP connections, but also provide all of the HTTP level
details (including headers and content encoding) to make it work. All IIS
does is detect if you've done enough to make the connection persistent and
keep open/close the connection if you haven't.
Since the current ISAPI redirector doesn't implement chunk encoding, IIS
whacks in a Connection: close header on all responses without
Content-Length and closes the connection to the client.

Closing the connection is actually a valid method of terminating a
response message in HTTP 1.1 (as Rainer alluded to, the statement
attributed to IBM below about a Content-Length being required in HTTP 1.1
is wrong in a lot of ways - indeed in some responses Content-Length must
not be included).
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 and
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10 seem to be
pretty clear on how an HTTP application that doesn't support persistent
connections should behave - what IIS + ISAPI Redirector is doing is (from
what I can tell) valid HTTP 1.1, it's just not polite in this day and age.

The fact that your web service call works when accessing Tomcat directly
via the HTTP connector implies that the client can handle chunk encoded
responses, since the Tomcat HTTP connector provides this for anything that
doesn't have a Content-Length set, and your logs indicate your web app
isn't setting one. I might have missed some magic Content-Length
calculation for small responses in the Tomcat HTTP connector, but I'd
imagine that wouldn't work in all cases (e.g if you had a really large
response message).
You could test this theory by sniffing the network traffic when connecting
directly to Tomcat, by installing Apache + mod_jk, or by using my patched
IIS connector from http://sourceforge.net/projects/timsjk (the latter two
options will provide chunked encoding on all responses coming from Tomcat
that don't already provide a Content-Length.
(btw I'd be very surprised if my chunked encoding patch attached to the BZ
issue worked, as it hasn't been updated to trunk for quite a while.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 states that
HTTP 1.1 applications must be able to receive chunk encoded responses so
if adherence to HTTP 1.1 is important in your environment, you should be
able to argue that this is a valid solution.

Other more desperate options would involve content buffering Servlet
Filters that wrap the response to calculate and set the Content-Length
headers (there were a couple floating around the Tomcat world a while
back) and hacking your web service toolkit to buffer messages pre sending
and set the Content-Length header. I've used the filter approach in the
past (pre HTTP 1.1), and it might be workable as long as your web services
responses have predictably and reasonably small content sizes.

cheers
tim

-Original Message-
From: Woytasik Joe [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 5 January 2008 10:10 a.m.
To: Tomcat Users List
Subject: RE: Content_Length Problem

Rainer,

Thanks for the quick response!  

I am able to repeat this request, and each time I get the same response.
The logging level is set to debug, but unfortunately I am unable to send
the log file (company policy).  I am going to scrub the log file to remove
any sensitive information, I will send that your way shortly.

I did some network sniffing and CONTENT_LENGTH is not sent.  

I built a new isapi_redirect.dll using the patch provided in Bugzilla.
This patch was supposed to allow chunked encoding, but I am not sure if I
applied it right.  Is there a registry setting that I need to change to
allow chunked encoding with this patch, or does it do it automatically?

Thanks-
Joe 

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 2:06 PM
To: Tomcat Users List
Subject: Re: Content_Length Problem

Hi Joe,

are you able to reproduce the behaviour with few, maybe only a single
request? If so: you can increase JkLogLevel to "debug" (not recommended
for high load production size, because it produces a 

RE: Content_Length Problem

2008-01-08 Thread Tim Whittington
That log statement indicates you haven't enabled chunked encoding in the
connector config (it's off by default).
Add enable_chunked_encoding=true to your isapi_redirect.properties (or as
a registry setting if you're using that) and restart IIS.

tim

-Original Message-
From: Woytasik Joe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 9 January 2008 3:25 a.m.
To: Tomcat Users List
Subject: RE: Content_Length Problem

I have tried the isapi_redirect.dll Tim provided, and it appeared to
almost work.  CICS made the request and received my response but for some
reason did not interpret it correctly.  Is there something in the
redirector's log that I can look at to verify it is using chunked
encoding?

I see the following line, but never see one where chunked encoding is
true.

[Tue Jan 08 08:05:07.220 2008] [13680:12960] [debug]
init_jk::jk_isapi_plugin.c (2146): Using chunked encoding? false. 

Thanks-
Joe

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 05, 2008 11:05 AM
To: Tomcat Users List
Subject: Re: Content_Length Problem

In Joes case CICS seems to get used as an HTTP client, not an HTTP server.

Nevertheless the server page you found includes a link to

http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/topic/com.ibm.cics.
ts31.doc/dfhtl/topics/dfhtl_cwschunking.htm

that contains the following information:

===
When CICS as an HTTP client receives a chunked message as a response to an
application program's request, the chunks are also assembled before being
passed to the application program as an entity body, and any trailing
headers can be read using the HTTP header commands. You can specify how
long the application will wait to receive the response, using the RTIMOUT
attribute of the transaction profile definition for the transaction ID
that relates to the application program.
===

So it seems, that CICS 3.1 does support chunked encoding when reading an
HTTP response.

So using either apache httpd or the chunked-encoding enabled variant of
the isapi redirector could indeed be the solution.

Regards,

Rainer

Martin Gainty schrieb:
> Tim-Thanks for the comprehensive explanationI found this link helpful 
> for CICS transactions 
> http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/
> com.ibm.cics.ts31.doc/dfhtl/topics/dfhtl_http11serverintro.htm
tml?ocid=TXT_TAGHM_Wave2_sharelife_012008

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This e-mail is confidential.  If you are not the intended recipient, you
must not disclose or use the information contained in it.  If you have
received this e-mail in error, please tell us immediately by return e-mail
to [EMAIL PROTECTED] and delete the document.

E-mails containing unprofessional, discourteous or offensive remarks
violate Sentry policy. You may report employee violations by forwarding
the message to [EMAIL PROTECTED]

No recipient may use the information in this e-mail in violation of any
civil or criminal statute. Sentry disclaims all liability for any
unauthorized uses of this e-mail or its contents.

This e-mail constitutes neither an offer nor an acceptance of any offer.
No contract may be entered into by a Sentry employee without express
approval from an authorized Sentry manager.

Warning: Computer viruses can be transmitted via e-mail. Sentry accepts no
liability or responsibility for any damage caused by any virus transmitted
with this e-mail.


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat ISAPI Redirector for IIS

2008-02-18 Thread Tim Whittington
It looks like you've got more than one thing going on.

The debug log refers to a worker named 'ajp13', which is the default name,
and not the one you've got  configured in your
uriworkermap.properties/worker.properties 
- This usually points to your filter config and the ISAPI extension DLL
(the one that's sitting in the virtual directory you created) not being
the same file.
- Sometimes this is just IIS being strange - a complete net stop iisadmin;
net start w3svc sometimes sorts it

The debug log also indicates it can't connect to the back end Tomcat
instance, but there's not enough info to tell exactly what's going on.
Change your log level to debug (in isapi_redirect.properties or the
registry if you're using that), do a complete IIS restart and make a
single request - post the resulting log and we can have a look at what's
going on.

cheers
tim

-Original Message-
From: doepain [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 19 February 2008 9:14 a.m.
To: users@tomcat.apache.org
Subject: Tomcat ISAPI Redirector for IIS


No matter what I try where I go I just keep hitting a wall with this ISAPI
redirector for IIS/Tomcat.
I have been trying to get this to work since 9:00 AM est, and I am losing
steam.  

I tried supplying any useful information for trouble shooting below

Error:
HTTP Status 404 - /jakarta/isapi_redirect.dll
type Status report
message /jakarta/isapi_redirect.dll
description The requested resource (/jakarta/isapi_redirect.dll)
is not available.
Apache Tomcat/5.0.16

uriworkermap.properties File:
# uriworker.properties -
#
# This file provides sample mappings for example # ajp13w worker defined
in workermap.properties.minimal

/jsp-examples/*=ajp13w
/servlet-examples/*=ajp13w

# Now filter out all .jpeg files inside that context # For no mapping the
url has to start with exclamation (!) #!/servlet-examples/*.jpeg=ajp13w

Workers.Properties.Minimal:
# workers.properties.minimal -
# This file provides minimal jk configuration properties needed to #
connect to Tomcat.
# The workers that jk should create and work with # Defining a worker
named ajp13w and of type ajp13 # Note that the name and the type do not
have to match.

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

Jakarta Isapi Redirector Install path:
C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf

Tomcat Install Path:
C:\Program Files\Apache Software Foundation\Tomcat 5.0

IIS V6.0 Settings
The "jakarta" Web Service Extension is Installed, and Allowed.
The ISAPI Filter for "jakarta" in installed, and its Status is "Online"
Priority "High"

Host:
Windows Server 2003 SP2

ISAPI-Redirector Log output:
[Mon Feb 18 13:11:38 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13 [Mon Feb 18 13:11:39 2008]
[error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13 [Mon Feb 18 13:21:47 2008]
[error] ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull
returned -3 with errno=54 [Mon Feb 18 13:21:47 2008] [error]
ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection [Mon Feb 18 13:21:48
2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon
Feb 18 13:21:48 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:21:48 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0 [Mon
Feb 18 13:21:48 2008] [info]  ajp_done::jk_ajp_common.c (1947): could not
find empty cache slot from 1 for worker ajp13. Rise worker cachesize [Mon
Feb 18 13:43:40 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned
-3 with errno=54 [Mon Feb 18 13:43:40 2008] [error]
ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection [Mon Feb 18 13:43:41
2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon
Feb 18 13:43:41 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:41 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0 [Mon
Feb 18 13:43:42 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started

Re: Does mod_jk support chunked encoding?

2008-07-15 Thread Tim Whittington
mod_jk does chunked encoding on all dynamic responses (e.g. From Tomcat)
that donĀ¹t already have some form of response end set (e.g. A Content-Length
header).
To be accurate I think this is more a function of Apache than mod_jk.
All you should need to do is connect Tomcat to Apache using mod_jk and it
should work out of the box.

tim 


From: Adam Gordon <[EMAIL PROTECTED]>
Reply-To: Tomcat Users List 
Date: Tue, 15 Jul 2008 15:29:02 -0600
To: Tomcat Users List 
Subject: Does mod_jk support chunked encoding?

Hi-

We're running Tomcat 5.5.16 behind Apache2 and one functionality of our
web app serves up ZIP files which are created on the fly.

We'd like to implement chunked-encoding to serve up the ZIP file so we
don't have to actually create a temporary file on disk first but also so
that we can immediately begin streaming the content to a user (i.e. a
user doesn't have to wait for the files to be compressed into one
file).  We just can't seem to find any documentation on how to set up
Apache, Tomcat, and mod_jk to support chunked encoding.

Can anyone point us in the right direction?  Thanks.

--adam

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]