Author: markt
Date: Wed Oct 16 11:12:46 2013
New Revision: 1532719
URL: http://svn.apache.org/r1532719
Log:
Add a debug message that enables the socket reference (used in most debuig
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/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1532719&r1=1532718&r2=1532719&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Oct 16
11:12:46 2013
@@ -1007,6 +1007,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/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=1532719&r1=1532718&r2=1532719&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Wed Oct 16 11:12:46 2013
@@ -50,10 +50,11 @@ endpoint.sendfile.error=Unexpected sendf
endpoint.sendfile.addfail=Sendfile failure: [{0}] {1}
endpoint.setAttribute=Set [{0}] to [{1}]
endpoint.timeout.err=Error processing socket timeout
+endpoint.apr.invalidSslProtocol=An invalid value [{0}] was provided for the
SSLProtocol attribute
+endpoint.apr.noSendfileWithSSL=Sendfile is not supported for the APR/native
connector when SSL is enabled
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.noSendfileWithSSL=Sendfile is not supported for the APR/native
connector when SSL is enabled
+endpoint.apr.remoteport=APR socket [{0}] opened with remote port [{1}]
endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]