Is this a plain synchronous scenario without any specific features
(like addressing, etc) or with some features or additional
interceptors?

I think there was an issue in a complex setup that lead to a similar
situation where the server was not returning the complete response.
But I think you could see the exception in the server side logging.

regards, aki

2012/5/4 jrmihalick <[email protected]>:
> Hi,
>
> I am running Apache CXF version 2.4.7 on both client and server.  The server
> is running a JAXWS web service under Spring.  We have been running in
> production with versions of CXF (starting with version 2.2, I think) for a
> while, but recently we have been seeing sporadic exceptions like the
> following at the end of this posting.  We were seeing sporadic problems
> under prior versions of CXF, so I don't think the version has anything to do
> with it.
>
> It seems that the server is perhaps prematurely closing the socket, but I
> have no idea why.  I have confirmed that the connection is terminating
> before my service method is even being reached.  For a long time I have had
> the following timeout settings on the client side, which have fixed other
> timeout issues we had in the past:
>
> ((BindingProvider)ace).getRequestContext().put("javax.xml.ws.client.connectionTimeout",
> 10*1000); // 10 secs
> ((BindingProvider)ace).getRequestContext().put("javax.xml.ws.client.receiveTimeout",
> 5*60*1000); // 5 mins
>
> I noticed on this particular failure, that the time between when the
> webservice method was invoked and when the exception was raised on the
> client side, about 43 seconds elapsed (most request/response round trips
> take on the order of 11 secs or less):
>
> *Service method invoked*
> 2012/05/03 *2:43:20* INFO  ACEClient - SENDING ACE Request:
> ja301726c_jcaAceMsc_8781_2012.05.03-14.43.20.983
>
> *Exception thrown*
> 2012/05/03 *2:44:03* org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNING: Interceptor for
> {http://pubs.acs.org/wsdl/jca/AceService}AceService#{http://pubs.acs.org/wsdl/jca/AceService}evaluate
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
>
> Unfortunately, there is no exception thrown on the server or any helpful
> logging.  I have not yet tried to bump up logging on the server for CXF
> because I was hoping that I could get some advice here first on what I
> should try.  It looks like increasing the logging on server will require me
> to redeploy and I'm not too keen about bumping up the logging on PROD unless
> I need to.
>
> *- Should I bump up the connectionTimeout on the client?
> - The server processes dozens of requests a day with no problem.  As a
> temporary measure (maybe permanent), should I just implement some retry
> logic?*
>
> Your suggestions are appreciated.
>
> =================================
> *Stack trace*
> =================================
> 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:263)
>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:461)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:364)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
>        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
>        at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
>        at $Proxy53.evaluate(Unknown Source)
> ...
> Caused by: java.net.SocketException: SocketException invoking
> http://xxxxxx:8080/ace/aceService: Unexpected end of file from server
>        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:513)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1438)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1423)
>        at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>        at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        ... 12 more
> Caused by: java.net.SocketException: Unexpected end of file from server
>        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
>        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
>        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>        at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1200)
>        at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1549)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1501)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1409)
>        ... 15 more
> Error running ACEClient
> javax.xml.ws.WebServiceException: Could not send Message.
>        at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
>        at $Proxy53.evaluate(Unknown Source)
> ...
> Caused by: java.net.SocketException: SocketException invoking
> http://xxxxxx:8080/ace/aceService: Unexpected end of file from server
>        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:513)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1438)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1423)
>        at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>        at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:461)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:364)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
>        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
>        at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
>        ... 5 more
> Caused by: java.net.SocketException: Unexpected end of file from server
>        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
>        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
>        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>        at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1200)
>        at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1549)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1501)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1409)
>        ... 15 more
>
>
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/Suggestions-for-troubleshooting-SocketException-Unexpected-end-of-file-from-server-tp5684471.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to