Author: markt
Date: Wed Oct 16 11:22:44 2013
New Revision: 1532725
URL: http://svn.apache.org/r1532725
Log:
Add a debug message that enables the socket reference (used in most debug
messages) to be matched to the port number (used in tcpdump) to enable unusual
behaviour in the debug logs to be easily matched to the corresponding network
activity.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1532719
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1532725&r1=1532724&r2=1532725&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed
Oct 16 11:22:44 2013
@@ -979,6 +979,13 @@ public class AprEndpoint extends Abstrac
// Accept the next incoming connection from the server
// socket
socket = Socket.accept(serverSock);
+ if (log.isDebugEnabled()) {
+ long sa = Address.get(Socket.APR_REMOTE, socket);
+ Sockaddr addr = Address.getInfo(sa);
+ log.debug(sm.getString("endpoint.apr.remoteport",
+ Long.valueOf(socket),
+ Long.valueOf(addr.port)));
+ }
} catch (Exception e) {
//we didn't get a socket
countDownConnection();
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=1532725&r1=1532724&r2=1532725&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Wed Oct 16 11:22:44 2013
@@ -49,10 +49,11 @@ endpoint.process.fail=Error allocating s
endpoint.sendfile.error=Unexpected sendfile error
endpoint.sendfile.addfail=Sendfile failure: [{0}] {1}
endpoint.timeout.err=Error processing socket timeout
+endpoint.apr.invalidSslProtocol=An invalid value [{0}] was provided for the
SSLProtocol attribute
endpoint.apr.noSslCertFile=Connector attribute SSLCertificateFile must be
defined when using SSL with APR
endpoint.apr.pollAddInvalid=Invalid attempted to add a socket [{0}] to the
poller
endpoint.apr.pollError=Poller failed with error [{0}] : [{1}]
endpoint.apr.pollUnknownEvent=A socket was returned from the poller with an
unrecognized event [{0}]
-endpoint.apr.invalidSslProtocol=An invalid value [{0}] was provided for the
SSLProtocol attribute
+endpoint.apr.remoteport=APR socket [{0}] opened with remote port [{1}]
endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
endpoint.warn.noExector=Failed to process socket [{0}] in state [{1}] because
the executor had already been shutdown
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]