[
https://jira.jboss.org/jira/browse/JBWS-2778?page=com.atlassian.jira.plug...
]
Richard Opalka commented on JBWS-2778:
--------------------------------------
The problem is in CXF WS-RM impl :(
The reason why user is getting HttpRetryException is
the fact CXF WS-RM client is in annonymous mode.
Server CXF WS-RM impl doesn't detect it's
addressing anonymous usecase
and tries to create connection with this WS-A anonymous URI.
The workaround for this CXF issue is to configure client to
be addressable (not using anonymous addressing URIs).
I added the following configuration to cxf.xml (WS-RM client configuration file).
---
<http:conduit
name="{http://cxf.redhat.com}BackendCxfTestPort.http-conduit">
<http:client
DecoupledEndpoint="http://localhost:9990/decoupled_endpoint"/>
</http:conduit>
---
After applying this workaround users will still see exceptions on JBossWS CXF server
side.
The reason is again in CXF WS-RM impl. It tries to connect to not already existing
endpoint
(in our case it was addressable client, which is down and not running anymore).
CXF WS-RM should not throw exceptions in such case. If it has undelivered messages, it
have to wait until addressable client will be available again. Instead of doing it it
throws exceptions.
This is the mentioned exception stack trace:
---
11:37:46,179 SEVERE [RetransmissionQueueImpl] WS-RM retransmission failed.
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.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1916)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1871)
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:1934)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.resend(RetransmissionQueueImpl.java:350)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.serverResend(RetransmissionQueueImpl.java:303)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.access$500(RetransmissionQueueImpl.java:71)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$3.resend(RetransmissionQueueImpl.java:546)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate.run(RetransmissionQueueImpl.java:417)
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate.initiate(RetransmissionQueueImpl.java:406)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate$1ResendTask.run(RetransmissionQueueImpl.java:500)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
---
java.net.HttpRetryException: cannot retry due to server
authentication, in streaming mode
------------------------------------------------------------------------------------------
Key: JBWS-2778
URL:
https://jira.jboss.org/jira/browse/JBWS-2778
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-cxf, ws-reliable
Affects Versions: jbossws-cxf-3.2.1
Reporter: Richard Opalka
Fix For: jbossws-cxf-3.3
Attachments: cxfTest-client.zip, cxfTest-service.zip
Livnat wrote:
We are working with JBOSS AS 5.1, JDK6, CXF 3.2.
We are trying to activate the reliable session feature of CXF but we
keep getting the following error:
/SEVERE [RetransmissionQueueImpl] WS-RM retransmission failed.
java.net.HttpRetryException: cannot retry due to server authentication,
in streaming mode
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1111)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2046)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2022)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1947)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.resend(RetransmissionQueueImpl.java:350)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.serverResend(RetransmissionQueueImpl.java:303)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.access$500(RetransmissionQueueImpl.java:71)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$3.resend(RetransmissionQueueImpl.java:546)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate.run(RetransmissionQueueImpl.java:417)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate.initiate(RetransmissionQueueImpl.java:406)
at
org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate$1ResendTask.run(RetransmissionQueueImpl.java:500)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)/
We are not using ws-security yet, and we don't use authentication.
This error also occurs in a very basic echo example we wrote. all the
fixes we saw in the mailing list to set HTTPConduit did not help we also
asked Bryan kearney (who worked on it in the past).
I attached an ear file with the echo example and an eclipse project with
the code and the client (in Test) we use.
Can you please tell us if this is a known bug or do we get it wrong?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira