DO NOT REPLY [Bug 51298] New: throw SocketException when tomcat deal large(300 or 600) concurrent dpwnload file request

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51298

 Bug #: 51298
   Summary: throw SocketException when tomcat deal large(300 or
600) concurrent dpwnload file request
   Product: Tomcat 6
   Version: 6.0.28
  Platform: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: amosl...@gmail.com
Classification: Unclassified


Environment:
OS:windows2008, JDK:1.6 Tomcat:6.0.28

How to reproduce it:
(1)We have a server running in tomcat.
(2)We have a servlet to write file into HttpServletResponse, key code is like
this:

OutputStream output = resp.getOutputStream(); //get response outputstream
... ...
output.write(b, 0, len); // write some file into it, client will receive it

(3)Use LoadRunner(Stress testing tool) simulate 300 concurrent HttpRequest,
when server received these requests, should write 10M's file content into the
response.
But, not all request can successfully, some of it disconnected when write file
into response.

I use log4j record exception like this:

ClientAbortException:  java.net.SocketException: Connection reset by peer:
socket write error
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)
at
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
at
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
at
com.dt.puppet.dp.view.PuppetDownloadView.render(PuppetDownloadView.java:92)
at
org.nutz.mvc.invoker.ActionInvokerImpl.invoke(ActionInvokerImpl.java:269)
at org.nutz.mvc.ActionInvoking.invoke(ActionInvoking.java:37)
at org.nutz.mvc.NutMvcContent.handle(NutMvcContent.java:81)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:57)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset by peer: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:741)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:765)
at
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:127)
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:574)
at org.apache.coyote.Response.doWrite(Response.java:560)
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
... 21 more


(4) Here is the server.xml, you can see the parameter:

















When find this exception, I adjust the Tomcat Connector parameter, add these
two parameter:
maxKeepAliveRequests="-1"  keepAliveTimeout=""(test many number)
But still have this problem.


So, Please tell me what I should do to avoid the exception when write something
to response.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51298] throw SocketException when tomcat deal large(300 or 600) concurrent dpwnload file request

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51298

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID
 OS/Version||All

--- Comment #1 from Mark Thomas  2011-05-31 08:08:17 UTC ---
The client is dropping the connection. This is not a Tomcat issue. The users
list can help you diagnose this.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #1 from Mark Thomas  2011-05-31 08:30:13 UTC ---
The documented and intended behaviour of unpackWARs is that it only applies to
WARs in the appBase.  This is true for 5.5.x, 6.0.x and 7.0.x.

Unpacking WARs from outside the appBase into the appBase should be possible but
adds complexity to the autoDeploy process that I am not convinced is worth it.

If an app needs to be unpacked there are two options:
- deploy the WAR in the appBase with unpackWARs=true
- deploy outside the appBase using a directory rather than a WAR

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51299] New: Knowing the credibility of company of which you are

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51299

 Bug #: 51299
   Summary: Knowing the credibility of company of which you are
   Product: Tomcat Native
   Version: 1.1.18
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Library
AssignedTo: dev@tomcat.apache.org
ReportedBy: harylaw...@yahoo.com
Classification: Unclassified


Knowing the credibility of company of which you are buying the coolers and
finally ensure assure about the functionality of http://www.aquapointwatercoolers.co.uk/";>water coolers systems.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51299] Knowing the credibility of company of which you are

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51299

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1129658 - in /tomcat/trunk: java/org/apache/catalina/authenticator/FormAuthenticator.java java/org/apache/catalina/authenticator/LocalStrings.properties webapps/docs/changelog.xml

2011-05-31 Thread markt
Author: markt
Date: Tue May 31 13:06:11 2011
New Revision: 1129658

URL: http://svn.apache.org/viewvc?rev=1129658&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51277
Improve error message if an application is deployed with an incomplete FORM 
authentication configuration.

Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java?rev=1129658&r1=1129657&r2=1129658&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 
Tue May 31 13:06:11 2011
@@ -365,9 +365,19 @@ public class FormAuthenticator
 protected void forwardToLoginPage(Request request,
 HttpServletResponse response, LoginConfig config)
 throws IOException {
+
+String loginPage = config.getLoginPage();
+if (loginPage == null || loginPage.length() == 0) {
+String msg = sm.getString("formAuthenticator.noLoginPage",
+context.getName());
+log.warn(msg);
+response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
+msg);
+return;
+}
+
 RequestDispatcher disp =
-context.getServletContext().getRequestDispatcher
-(config.getLoginPage());
+context.getServletContext().getRequestDispatcher(loginPage);
 try {
 if (context.fireRequestInitEvent(request)) {
 disp.forward(request.getRequest(), response);
@@ -398,6 +408,17 @@ public class FormAuthenticator
 protected void forwardToErrorPage(Request request,
 HttpServletResponse response, LoginConfig config)
 throws IOException {
+
+String errorPage = config.getErrorPage();
+if (errorPage == null || errorPage.length() == 0) {
+String msg = sm.getString("formAuthenticator.noErrorPage",
+context.getName());
+log.warn(msg);
+response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
+msg);
+return;
+}
+
 RequestDispatcher disp =
 context.getServletContext().getRequestDispatcher
 (config.getErrorPage());

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties?rev=1129658&r1=1129657&r2=1129658&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings.properties 
Tue May 31 13:06:11 2011
@@ -32,6 +32,8 @@ digestAuthenticator.cacheRemove=A valid 
  
 formAuthenticator.forwardErrorFail=Unexpected error forwarding to error page
 formAuthenticator.forwardLoginFail=Unexpected error forwarding to login page
+formAuthenticator.noErrorPage=No error page was defined for FORM 
authentication in context [{0}]
+formAuthenticator.noLoginPage=No login page was defined for FORM 
authentication in context [{0}]
 
 spnegoAuthenticator.authHeaderNoToken=The Negotiate authorization header sent 
by the client did not include a token
 spnegoAuthenticator.authHeaderNotNego=The authorization header sent by the 
client did not start with Negotiate

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1129658&r1=1129657&r2=1129658&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue May 31 13:06:11 2011
@@ -67,6 +67,10 @@
 51274: Add missing i18n strings in PersistentManagerBase.
 Patch provided by Eiji Takahashi. (markt)
   
+  
+51277: Improve error message if an application is deployed
+with an incomplete FORM authentication configuration. (markt)
+  
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51277] NPE during the form authentication when form-login-config is missed

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51277

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-05-31 13:06:04 UTC ---
Check the response again. You do get a 500 response.

I agree that the stack traced is not ideal. I have modified this to provide a
more useful error message.

The fix has been made to 7.0.x and will be included in 7.0.15 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294

Andrey M  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |

--- Comment #2 from Andrey M  2011-05-31 13:19:59 UTC ---
What about Context Container documentation:

unpackWAR: If true, Tomcat will unpack all compressed web applications before
running them. If not specified, the default value is true.

When I use  I can't find
unpacked WAR content in appBase and see only part of WAR in WORK directory
(only libs and something from META-INF)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1129863 - /tomcat/tc6.0.x/trunk/webapps/docs/logging.xml

2011-05-31 Thread schultz
Author: schultz
Date: Tue May 31 19:24:07 2011
New Revision: 1129863

URL: http://svn.apache.org/viewvc?rev=1129863&view=rev
Log:
Added 'layout' configuration for log4j loggers.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/logging.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?rev=1129863&r1=1129862&r2=1129863&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Tue May 31 19:24:07 2011
@@ -422,6 +422,7 @@ log4j.appender.CATALINA.file=${catalina.
 log4j.appender.CATALINA.encoding=UTF-8
 # Roll-over the log once per day
 log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
+log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
 log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.CATALINA.append=true
 
@@ -429,6 +430,7 @@ log4j.appender.LOCALHOST=org.apache.log4
 log4j.appender.LOCALHOST.file=${catalina.base}/logs/localhost.
 log4j.appender.LOCALHOST.encoding=UTF-8
 log4j.appender.LOCALHOST.DatePattern='.'-MM-dd'.log'
+log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
 log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.LOCALHOST.append=true
 
@@ -436,6 +438,7 @@ log4j.appender.MANAGER=org.apache.log4j.
 log4j.appender.MANAGER.file=${catalina.base}/logs/manager.
 log4j.appender.MANAGER.encoding=UTF-8
 log4j.appender.MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
 log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.MANAGER.append=true
 
@@ -443,11 +446,13 @@ log4j.appender.HOST-MANAGER=org.apache.l
 log4j.appender.HOST-MANAGER.file=${catalina.base}/logs/host-manager.
 log4j.appender.HOST-MANAGER.encoding=UTF-8
 log4j.appender.HOST-MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
 log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.HOST-MANAGER.append=true
 
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.encoding=UTF-8
+log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
 
 # Configure which loggers log to which appenders



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1129869 - /tomcat/trunk/webapps/docs/logging.xml

2011-05-31 Thread schultz
Author: schultz
Date: Tue May 31 19:30:16 2011
New Revision: 1129869

URL: http://svn.apache.org/viewvc?rev=1129869&view=rev
Log:
Added 'layout' configuration for log4j loggers.

Modified:
tomcat/trunk/webapps/docs/logging.xml

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?rev=1129869&r1=1129868&r2=1129869&view=diff
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Tue May 31 19:30:16 2011
@@ -419,6 +419,7 @@ log4j.appender.CATALINA.file=${catalina.
 log4j.appender.CATALINA.encoding=UTF-8
 # Roll-over the log once per day
 log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
+log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
 log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.CATALINA.append=true
 
@@ -426,6 +427,7 @@ log4j.appender.LOCALHOST=org.apache.log4
 log4j.appender.LOCALHOST.file=${catalina.base}/logs/localhost.
 log4j.appender.LOCALHOST.encoding=UTF-8
 log4j.appender.LOCALHOST.DatePattern='.'-MM-dd'.log'
+log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
 log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.LOCALHOST.append=true
 
@@ -433,6 +435,7 @@ log4j.appender.MANAGER=org.apache.log4j.
 log4j.appender.MANAGER.file=${catalina.base}/logs/manager.
 log4j.appender.MANAGER.encoding=UTF-8
 log4j.appender.MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
 log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.MANAGER.append=true
 
@@ -440,11 +443,13 @@ log4j.appender.HOST-MANAGER=org.apache.l
 log4j.appender.HOST-MANAGER.file=${catalina.base}/logs/host-manager.
 log4j.appender.HOST-MANAGER.encoding=UTF-8
 log4j.appender.HOST-MANAGER.DatePattern='.'-MM-dd'.log'
+log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
 log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.HOST-MANAGER.append=true
 
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.encoding=UTF-8
+log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
 
 # Configure which loggers log to which appenders



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Outdated Servlet 3.0 Javadocs available on tomcat.apache.org

2011-05-31 Thread Christopher Schultz
All,

I just went to check something in the 3.0 Servlet API and the most
convenient place I've found is on the Tomcat site. Unfortunately, it
looks like it's out of date:

http://tomcat.apache.org/tomcat-7.0-doc/servletapi/index.html

Many of the 3.0 classes and methods are left undocumented (for example
ServletContext.addFilter).

http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/ServletContext.html#addFilter%28java.lang.String,%20java.lang.Class%29

It just looks like the API docs up there are from an old publication of
the spec. The currently-available javadocs from the spec page are
complete with comments, etc.

What's the best way to update those javadocs? I'd be happy to do it.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 51278] Unable to override default servlet other than in main web.xml

2011-05-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51278

--- Comment #3 from Christopher Schultz  
2011-05-31 21:07:07 UTC ---
That would seem to conflict with the exposure of servlet registration events in
the 3.0 API... a registration event that occurs later isn't supposed to
conflict with ones occurring earlier (for Servlets, that is... I realize we're
discussing Filters, here).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org