-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
Not Required
-
NEW
Issue: HttpsNoDelaySocketFactory isn't invoked when StubExt.PROPERTY_NO_DELAY_SOCKET_ENABLED is used
In my client I'm using this code:
BindingProvider bp = (BindingProvider) port;
bp.getRequestContext().put(StubExt.PROPERTY_NO_DELAY_SOCKET_ENABLED, Boolean.TRUE);
I have Byteman script - SocketMonitor.btm which checks all invocations of java.net.Socket.setTcpNoDelay(boolean) and it's never called from HttpsNoDelaySocketFactory - I print trace of the calls.
HttpsNoDelaySocketFactory.java calls setTcpNoDelay but it's not in the stacktrace. Byteman script is extended to check invocation of HttpsNoDelaySocketFactory and createRemotingMetaData from org.jboss.ws.core.client.HTTPRemotingConnection.
Property StubExt.PROPERTY_NO_DELAY_SOCKET_ENABLED is correctly propagated and customSocketFactory is set to class org.jboss.ws.core.client.socket.HttpsNoDelaySocketFactory. But still HttpsNoDelaySocketFactory is not used.
To reproduce it checkout https://svn.devel.redhat.com/repos/jboss-qa/load-testing/apps/ws-test/branch/ws-test-EAP5-legacy
mvn -Pjboss530,security-prepare clean test -Dtest=NONE
cp target/test-libs/jaxws-benchmark-basic-https.jar $JBOSS_HOME/server/default/deploy/
edit $JBOSS_HOME/server/default/deploy/jbossweb.sar/server.xml
<Connector protocol="HTTP/1.1" SSLEnabled="true" port="8443" address="${jboss.bind.address}" scheme="https" secure="true" clientAuth="false" keystoreFile="/PATH/TO/ws-test-EAP5-legacy/etc/keystore" keystorePass="topSecret" sslProtocol = "TLS" />
$JBOSS_HOME/bin/run.sh -c default -b 127.0.0.1
mvn -Dwarmup.runs=0 -Dwarmup.iterations=0 -Dsimulated.clients=1 -Dtest.runs=1 -Diterations.in.run=1 -Dincreased.iterations.in.run=0 -Dgenerate.charts=false -Dserver.address=127.0.0.1:8080 -Djboss.home=/home/rsvoboda/TESTING/530-prebuild/jboss-5.3.0.Branch -Pbyteman,jboss530,security clean test -Dtest=CustomPerfJUnitTest -DperfTest=basic.https.BasicHttpsNoDelayTest -Dbyteman.jar.location=/opt/byteman-download-2.1.4.1/lib/byteman.jar
Details for EAP 5.3.0 client
[rsvoboda@steve ws-test-EAP5-legacy]$ mvn -Dsurefire.timeout=7200 -Dwarmup.runs=0 -Dwarmup.iterations=0 -Dsimulated.clients=1 -Dtest.runs=1 -Diterations.in.run=1 -Dincreased.iterations.in.run=0 -Dgenerate.charts=false -Dserver.address=127.0.0.1:8080 -Djboss.home=/home/rsvoboda/TESTING/530-prebuild/jboss-5.3.0.Branch -Pbyteman,jboss530,security clean test -Dtest=CustomPerfJUnitTest -DperfTest=basic.https.BasicHttpsNoDelayTest -Dbyteman.jar.location=/opt/byteman-download-2.1.4.1/lib/byteman.jar
*** Entering SET TcpNoDelay, CURRENT value is false *** SET TcpNoDelay ---> true, NEW VALUE: true *** Socket SET TcpNoDelay 68de462[SSL_NULL_WITH_NULL_NULL: Socket[addr=/127.0.0.1,port=8443,localport=40451]]java.net.Socket.setTcpNoDelay(Socket.java:865) com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.setTcpNoDelay(BaseSSLSocketImpl.java:310) sun.net.www.http.HttpClient.openServer(HttpClient.java:423) sun.net.www.http.HttpClient.openServer(HttpClient.java:525) sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) java.net.URL.openStream(URL.java:1010) org.jboss.ws.core.utils.ResourceURL.openStream(ResourceURL.java:55) org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:167) org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:109) . . .
########### callProps ###################### Keys: [javax.xml.ws.service.endpoint.address, org.jboss.ws.socket.no.delay.socket.enabled] Values: [https://127.0.0.1:8443/jaxws-benchmark-basic-https/EndpointImpl, true] ############################################ ########### Returned map ################### Keys: [NoThrowOnError, HEADER, customSocketFactory] Values: [true, {SOAPAction="urn:EchoString", Content-Type=text/xml; charset=UTF-8}, class org.jboss.ws.core.client.socket.HttpsNoDelaySocketFactory] ############################################
*** Entering SET TcpNoDelay, CURRENT value is false *** SET TcpNoDelay ---> true, NEW VALUE: true *** Socket SET TcpNoDelay 35e09eab[SSL_NULL_WITH_NULL_NULL: Socket[addr=/127.0.0.1,port=8443,localport=40452]]java.net.Socket.setTcpNoDelay(Socket.java:865) com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.setTcpNoDelay(BaseSSLSocketImpl.java:310) sun.net.www.http.HttpClient.openServer(HttpClient.java:423) sun.net.www.http.HttpClient.openServer(HttpClient.java:525) sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1031) sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230) org.jboss.remoting.transport.http.HTTPClientInvoker.getOutputStream(HTTPClientInvoker.java:1301) org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:367) org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253) org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176)
Details for EAP 5.2.0 client
[rsvoboda@steve ws-test-EAP5-legacy]$ mvn -Dsurefire.timeout=7200 -Dwarmup.runs=0 -Dwarmup.iterations=0 -Dsimulated.clients=1 -Dtest.runs=1 -Diterations.in.run=1 -Dincreased.iterations.in.run=0 -Dgenerate.charts=false -Dserver.address=127.0.0.1:8080 -Djboss.home=/home/rsvoboda/TESTING/530-prebuild/jboss-5.3.0.Branch -Pbyteman,jboss520,security clean test -Dtest=CustomPerfJUnitTest -DperfTest=basic.https.BasicHttpsNoDelayTest -Dbyteman.jar.location=/opt/byteman-download-2.1.4.1/lib/byteman.jar
*** Entering SET TcpNoDelay, CURRENT value is false *** SET TcpNoDelay ---> true, NEW VALUE: true *** Socket SET TcpNoDelay 4d8ce14a[SSL_NULL_WITH_NULL_NULL: Socket[addr=/127.0.0.1,port=8443,localport=40465]]java.net.Socket.setTcpNoDelay(Socket.java:865) com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.setTcpNoDelay(BaseSSLSocketImpl.java:310) sun.net.www.http.HttpClient.openServer(HttpClient.java:423) sun.net.www.http.HttpClient.openServer(HttpClient.java:525) sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) java.net.URL.openStream(URL.java:1010) org.jboss.ws.core.utils.ResourceURL.openStream(ResourceURL.java:55) org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:167) org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:109) . . .
########### callProps ###################### Keys: [javax.xml.ws.service.endpoint.address, org.jboss.ws.socket.no.delay.socket.enabled] Values: [https://127.0.0.1:8443/jaxws-benchmark-basic-https/EndpointImpl, true] ############################################ ########### Returned map ################### Keys: [NoThrowOnError, HEADER] Values: [true, {SOAPAction="urn:EchoString", Content-Type=text/xml; charset=UTF-8}] ############################################
*** Entering SET TcpNoDelay, CURRENT value is false *** SET TcpNoDelay ---> true, NEW VALUE: true *** Socket SET TcpNoDelay 64a22671[SSL_NULL_WITH_NULL_NULL: Socket[addr=/127.0.0.1,port=8443,localport=40466]]java.net.Socket.setTcpNoDelay(Socket.java:865) com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.setTcpNoDelay(BaseSSLSocketImpl.java:310) sun.net.www.http.HttpClient.openServer(HttpClient.java:423) sun.net.www.http.HttpClient.openServer(HttpClient.java:525) sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1031) sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230) org.jboss.remoting.transport.http.HTTPClientInvoker.getOutputStream(HTTPClientInvoker.java:1301) org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:367) org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253) org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176)
Suspicion for TcpNoDelay functionality
It seems that java.net.Socket.setTcpNoDelay(true) worked before JBPAPP-10948 effort - based on execution with EAP 5.2.0 GA client
- is related to
-
JBPAPP-10911 Provide for container (or Picketlink Login Module) configuration to disable the Nagle's Algorithm on Web Service Calls
- Closed