[ https://issues.apache.org/jira/browse/CXF-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985229#action_12985229 ]
Dennis Sosnoski commented on CXF-1156: -------------------------------------- The given scenario sounds to me like a configuration issue. If your requests may take a long time to process, either use asynchronous requests or set a long timeout - and set your retransmission timeout sufficiently large to allow for requests to be processed. But the underlying issue is correct. I started a reliable exchange with CXF, then took down the server part way through. My client died with the following exception: Jan 23, 2011 2:27:26 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://sosnoski.com/ws/rmtest}MirrorService#{http://sosnoski.com/ws/rmtest}reflect has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) at $Proxy28.reflect(Unknown Source) at com.sosnoski.ws.rmtest.TestMirror.main(TestMirror.java:68) Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8080/cxf-rmtest/: Connection refused at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2106) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2091) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:186) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) ... 8 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:520) at sun.net.NetworkClient.doConnect(NetworkClient.java:152) at sun.net.www.http.HttpClient.openServer(HttpClient.java:388) at sun.net.www.http.HttpClient.openServer(HttpClient.java:523) at sun.net.www.http.HttpClient.<init>(HttpClient.java:231) at sun.net.www.http.HttpClient.New(HttpClient.java:304) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:2002) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1954) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2022) ... 12 more Jan 23, 2011 2:27:29 PM org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$3 resend INFO: WS-RM retransmission of message 3. Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy28.reflect(Unknown Source) at com.sosnoski.ws.rmtest.TestMirror.main(TestMirror.java:68) Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8080/cxf-rmtest/: Connection refused at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2106) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2091) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:186) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) ... 2 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:520) at sun.net.NetworkClient.doConnect(NetworkClient.java:152) at sun.net.www.http.HttpClient.openServer(HttpClient.java:388) at sun.net.www.http.HttpClient.openServer(HttpClient.java:523) at sun.net.www.http.HttpClient.<init>(HttpClient.java:231) at sun.net.www.http.HttpClient.New(HttpClient.java:304) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:2002) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1954) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2022) ... 12 more Kind of misses the whole point of reliable message exchange, which it so cope with issues like temporary network outages. > Even with WS-RM network failure propogated to the application > ------------------------------------------------------------- > > Key: CXF-1156 > URL: https://issues.apache.org/jira/browse/CXF-1156 > Project: CXF > Issue Type: Bug > Components: WS-* Components > Affects Versions: 2.0.2 > Reporter: Bharath Ganesh > > Consider the scenario: > 1. WS-RM is enabled on the endpoint. > 2. The client sends a request to the server endpoint(req-resp). The request > message is passed to the application at the destination end, after going > through the RM Destination interceptors. But the RM -destination interceptors > do not send the acknowledgment to the client, as the acknowledgment is > piggybacked along with the response. > 3. Now assume the processing takes a longer time at the server side, the > client would get a read timeout and client thread would die. > 4. But the RM timer task at the client side would wake up and send the > request again, making the server code to get executed twice.(rather many > times) > Ideally: > In this case it was a read timeout exception which was easy to be replicated. > Assume it was a network failure while the response was being send from server > to client. The client application thread would get the network exception, and > die out. But the RM timer thread would try out a resend again. Ideally the > application should never get the exception, instead get the response received > by the RM-retrial timer thread should be given to the application. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.