Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50273
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 22 Nov 2010 13:42:01 +0000 (13:42 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 22 Nov 2010 13:42:01 +0000 (13:42 +0000)
Provide a workaround for an HP-UX issue that can result in large numbers of SEVERE log messages appearing in the logs as a result of normal operation.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1037715 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/AprEndpoint.java
webapps/docs/changelog.xml

index fcf8349..1fda4e7 100644 (file)
@@ -912,6 +912,7 @@ public class AprEndpoint extends AbstractEndpoint {
      */
     protected class Acceptor extends Thread {
 
+        private final Log log = LogFactory.getLog(AprEndpoint.Acceptor.class);
 
         /**
          * The background thread that listens for incoming TCP/IP connections and
@@ -954,7 +955,22 @@ public class AprEndpoint extends AbstractEndpoint {
                     }
                 } catch (Throwable t) {
                     ExceptionUtils.handleThrowable(t);
-                    if (running) log.error(sm.getString("endpoint.accept.fail"), t);
+                    if (running) {
+                        String msg = sm.getString("endpoint.accept.fail");
+                        if (t instanceof Error) {
+                            Error e = (Error) t;
+                            if (e.getError() == 233) {
+                                // Not an error on HP-UX so log as a warning
+                                // so it can be filtered out on that platform
+                                // See bug 50273
+                                log.warn(msg, t);
+                            } else {
+                                log.error(msg, t);
+                            }
+                        } else {
+                                log.error(msg, t);
+                        }
+                    }
                 }
 
                 // The processor will recycle itself when it finishes
index 678ca77..f9dce07 100644 (file)
         <bug>50192</bug>: Improve performance for EL when running under a
         security manager. Based on a patch by Robert Goff. (markt) 
       </fix>
+      <add>
+        <bug>50273</bug>: Provide a workaround for an HP-UX issue that can
+        result in large numbers of SEVERE log messages appearing in the logs as
+        a result of normal operation. (markt)
+      </add>
       <fix>
         <bug>50293</bug>: Increase the size of internal ELResolver array from 2 
         to 8 since in typical usage there are at least 5 resolvers. Based on a