You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Frueh, Shane A." <Sh...@Pearson.com> on 2009/06/26 18:20:06 UTC

connection forcibly closed by remote host

I have an issue I'm trying to debug and I'm not sure what is going on.
The server is CXF 2.1.4 with Jetty.  I'm configuring the CXFBus through
the API (not through Spring) and publishing a JAX-WS endpoint through
the API as well.  I can reproduce the problem with both Metro v1.5 and
CXF 2.1.4 as the client software.  In the client, I sometimes get a
result and sometimes get the exception shown in the 2nd log, which
follows.  On the server, I always get the exception shown in the
following log.

 

A partial log from the server:

 

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
outputChainToLog

FINE: Chain org.apache.cxf.phase.PhaseInterceptorChain@1f4cf6f was
modified. Current flow:

  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]

  post-logical [SoapPreProtocolOutInterceptor]

  prepare-send [MessageSenderInterceptor]

  pre-stream [AttachmentOutInterceptor, StaxOutInterceptor]

  pre-protocol [SOAPHandlerInterceptor]

  write [SoapOutInterceptor]

  pre-marshal [LogicalHandlerOutInterceptor]

  marshal [WrappedOutInterceptor, BareOutInterceptor]

  write-ending [SoapOutEndingInterceptor]

  pre-stream-ending [StaxOutEndingInterceptor]

  prepare-send-ending [MessageSenderEndingInterceptor]

 

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.jaxws.handler.logical.LogicalHandlerOutInterceptor@1bb982
9

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.interceptor.WrappedOutInterceptor@12a78ee

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@1696452

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEnding
Interceptor@623367

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxOutInterceptor$StaxOutEndingInterceptor@e
b840f

Jun 26, 2009 10:58:09 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept

FINE: Invoking handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor@1b9ef36

Jun 26, 2009 10:58:09 AM
org.apache.cxf.transport.http_jetty.JettyHTTPDestination serviceRequest

FINE: Finished servicing http request on thread: Thread[btpool0-1 -
/TestService,5,main]

Jun 26, 2009 10:58:09 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: RESPONSE /TestService  200

Jun 26, 2009 10:58:09 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: continuation still pending null

Jun 26, 2009 10:58:09 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: continuation RetryContinuation@21570718,new

Jun 26, 2009 10:58:10 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: continuation RetryContinuation@21570718,new

Jun 26, 2009 10:58:10 AM sun.reflect.NativeMethodAccessorImpl invoke0

FINE: EXCEPTION 

java.io.IOException: An existing connection was forcibly closed by the
remote host

            at sun.nio.ch.SocketDispatcher.read0(Native Method)

            at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)

            at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)

            at sun.nio.ch.IOUtil.read(IOUtil.java:206)

            at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)

            at
org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:128)

            at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:282)

            at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

            at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

            at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)

            at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:450)

Jun 26, 2009 10:58:10 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: EOF

Jun 26, 2009 10:58:10 AM sun.reflect.GeneratedMethodAccessor4 invoke

FINE: continuation RetryContinuation@21570718,new

 

 

Exception from client log:

 

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error
reading XMLStreamReader.

            at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)

            at $Proxy46.getBasicMetadata(Unknown Source)

            at client.CXFClient.main(CXFClient.java:51)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

            at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

            at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:597)

            at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading
XMLStreamReader.

            at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:184)

            at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:57)

            at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:226)

            at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:641)

            at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
onseInternal(HTTPConduit.java:2102)

            at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
onse(HTTPConduit.java:1980)

            at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
Conduit.java:1905)

            at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)

            at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:600)

            at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:62)

            at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:226)

            at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)

            at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)

            at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)

            at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

            at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

            ... 7 more

Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog

 at [row,col {unknown-source}]: [1,0]

            at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)

            at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)

            at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:
2040)

            at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)

            at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)

            at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:86)

            ... 22 more