[
http://jira.jboss.com/jira/browse/JBREM-979?page=comments#action_12412403 ]
Ron Sigal commented on JBREM-979:
---------------------------------
Added configuration parameter HTTPClientInvoker.NUMBER_OF_CALL_ATTEMPTS (actual value
"numberOfCallAttempts"), which determines the number of times HTTPClientInvoker
will attempt to create and use an HttpURLConnection in the face of a connection failure.
The default value is 1; that is, the default behavior is to do no retries.
Unit test: org.jboss.test.remoting.transport.http.retry.ConnectionRetryTestCase.
Waiting on hudson results.
Add invocation retry facility to http transport
-----------------------------------------------
Key: JBREM-979
URL:
http://jira.jboss.com/jira/browse/JBREM-979
Project: JBoss Remoting
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Affects Versions: 2.4.0.CR2
Reporter: Ron Sigal
Assigned To: Ron Sigal
Fix For: 2.4.0.GA
The test org.jboss.test.remoting.transport.http.keep_alive.StressHTTPInvokerTestCase is
failing occasionally with
testPostInvocation(org.jboss.test.remoting.transport.http.keep_alive.StressHTTPInvokerTestClient)java.lang.Exception:
org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
at
org.jboss.test.remoting.transport.web.WebInvokerTestClient.testPostInvocationSub(WebInvokerTestClient.java:153)
at
org.jboss.test.remoting.transport.web.WebInvokerTestClient.testPostInvocation(WebInvokerTestClient.java:54)
at
org.jboss.test.remoting.transport.http.keep_alive.StressHTTPInvokerTestClient.testPostInvocation(StressHTTPInvokerTestClient.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.jboss.jrunit.harness.ServerTestHarness.executeTestSuite(ServerTestHarness.java:302)
at org.jboss.jrunit.harness.ServerTestHarness.access$000(ServerTestHarness.java:51)
at org.jboss.jrunit.harness.ServerTestHarness$2.run(ServerTestHarness.java:225)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client
invoker.
at
org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:346)
at
org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:146)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:177)
at org.jboss.remoting.Client.invoke(Client.java:1708)
at org.jboss.remoting.Client.invoke(Client.java:612)
at
org.jboss.test.remoting.transport.web.WebInvokerTestClient.makeExceptionInvocation(WebInvokerTestClient.java:215)
at
org.jboss.test.remoting.transport.web.WebInvokerTestClient.testPostInvocationSub(WebInvokerTestClient.java:148)
... 20 more
Caused by: java.io.IOException: Stream closed.
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:428)
at java.net.SocketInputStream.available(SocketInputStream.java:217)
at java.io.BufferedInputStream.read(BufferedInputStream.java:321)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:111)
at
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2196)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2213)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2226)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
at
org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:98)
at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:75)
at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:122)
at org.jboss.remoting.marshal.http.HTTPUnMarshaller.read(HTTPUnMarshaller.java:71)
at
org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:496)
at
org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:317)
... 26 more
It looks like the HttpURLConnection has returned a cached connection, the
HTTPClientInvoker writes the invocation, and then it turns out that the server has closed
the connection. It would be useful to add a retry facility parallel to the one in the
socket transport.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira