You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rajat Gupta05 <Ra...@infosys.com> on 2009/04/16 06:55:18 UTC

how to configure a PKCS#11 keysore and use it with Tomcat for SSL enabling

Thanks
Rajat


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

RE: how to configure a PKCS#11 keysore and use it with Tomcat for SSLenabling

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rajat Gupta05 [mailto:Rajat_Gupta05@infosys.com]
> Subject: how to configure a PKCS#11 keysore and use it with Tomcat for
> SSLenabling

http://www.catb.org/~esr/faqs/smart-questions.html

At a bare minimum, tell us the Tomcat version you're using, the JRE/JDK it's running on, and whether or not you're using APR.  Also try reading the SSL portion of the Tomcat doc for whatever version you're on.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


solution RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

Posted by Leonard Gestrin <Le...@markettools.com>.
I found a solution that seems to hold.

Instead of associating ImageWriter directly with response.outputstream, I create temporary ByteInputStream that is associated with javax.imageio.ImageWriter 

Once imagewriter is done, I am dumping ByteInputStream bytes to  response.outputsream.

My theory is that ImageWriter was hanging to outputstream longer than it supposed to 
And that was causing issues in "ClientAbortException" cases.

Thanks


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Thursday, April 16, 2009 9:45 AM
To: Tomcat Users List
Subject: RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

> From: Leonard Gestrin [mailto:Leonard.Gestrin@markettools.com]
> Subject: request.getSession() generates IllegalStateException in top
> filter(appears, response not being recycled properly if SocketException
> happenedfor it in the past)
> 
> After a while, the same response object is being used by tomcat again,
> but as it gets to a first filter, I can see that it's already in
> commited state (response.isCommitted()==true)

It's not completely clear from your description whether the filter is part of the request that encountered the socket error or a different request.  If the former, the behavior you observe is expected; if the latter, you may be running into this bug, fixed over a year ago:
https://issues.apache.org/bugzilla/show_bug.cgi?id=30949

> This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

What happens if you try it on a version that's not over 2.5 years old?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


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


RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

Posted by Leonard Gestrin <Le...@markettools.com>.
Hi Chuck,
I downloaded tomcat 6.0.18 and the problem still happens.

The filter is not on the path to servlet that generates image;

The problem with response being already committed happens in various places (in filter and in graph servlet itself on the subsequent calls).

I can see that only tomcat's code in on the stack when it happens.

Thanks


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Thursday, April 16, 2009 9:45 AM
To: Tomcat Users List
Subject: RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

> From: Leonard Gestrin [mailto:Leonard.Gestrin@markettools.com]
> Subject: request.getSession() generates IllegalStateException in top
> filter(appears, response not being recycled properly if SocketException
> happenedfor it in the past)
>
> After a while, the same response object is being used by tomcat again,
> but as it gets to a first filter, I can see that it's already in
> commited state (response.isCommitted()==true)

It's not completely clear from your description whether the filter is part of the request that encountered the socket error or a different request.  If the former, the behavior you observe is expected; if the latter, you may be running into this bug, fixed over a year ago:
https://issues.apache.org/bugzilla/show_bug.cgi?id=30949

> This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

What happens if you try it on a version that's not over 2.5 years old?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


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


RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Leonard Gestrin [mailto:Leonard.Gestrin@markettools.com]
> Subject: request.getSession() generates IllegalStateException in top
> filter(appears, response not being recycled properly if SocketException
> happenedfor it in the past)
> 
> After a while, the same response object is being used by tomcat again,
> but as it gets to a first filter, I can see that it's already in
> commited state (response.isCommitted()==true)

It's not completely clear from your description whether the filter is part of the request that encountered the socket error or a different request.  If the former, the behavior you observe is expected; if the latter, you may be running into this bug, fixed over a year ago:
https://issues.apache.org/bugzilla/show_bug.cgi?id=30949

> This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

What happens if you try it on a version that's not over 2.5 years old?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


request.getSession() generates IllegalStateException in top filter (appears, response not being recycled properly if SocketException happened for it in the past)

Posted by Leonard Gestrin <Le...@markettools.com>.
Hello,

This is my first post on the list and I've been using tomcat for few years, so I want to start off stating that it is an excellent product.

However, I've ran into an issue, which I am not sure what to do about.

We have jsp that displays multiple images, which is being written directly to the page by the servlet.

<img src="/chart/DrawTestChart>

Every once in while, in the servlet,  while writing the bytes out, I get " ClientAbortException:  java.net.SocketException: Connection reset by peer"

At this point, I catch an exception and in finally block, I am trying to close response.outputstream.

After a while, the same response object is being used by tomcat again, but as it gets to a first filter, I can see that it's already in commited state (response.isCommitted()==true)

I know it's the same response object for which SocketException was generated, because I am printing response.hashcode() in chart servlet and in Filter

This really sucks, because anything I try to do with such response is doomed to fail :)

So, please advise how can I work around this issue, short of writing image in temp directory of tomcat as oppose to directly to response output stream.

This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

I can provide code snippets, if it would be helpful. (chart servlet is using jdk classes
java.awt.image.BufferedImage to create image
javax.imageio.ImageWriter that is wrapped on top of response.outputstream)

Thanks

Leonard







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