【发布时间】:2017-11-24 17:33:04
【问题描述】:
我想通过 WSO2 ESB 代理 RemoteUserStoreManagerService(在 WSO2 IS 上公开)。
当我调用 getUserClaimValuesForClaims 操作时,我得到了响应。我测试了 WSO2 IS(连接到我的 Active Directory)的性能。我在 100 个线程中发送请求(每个线程有 250 毫秒的延迟),它给了我 250 毫秒的平均响应(这对我来说没问题)。
所以我使用 Transformation 代理代理了 getUserClaimValuesForClaims 操作,它也有效。但是在性能测试期间(负载相同或更小),我遇到了以下错误,并且并非所有消息都已返回(平均 100 条消息中的 1 条)。
[2014-01-06 19:28:21,047] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:d2b85c03-beaf-409b-bf39-2e8143bd9e0b, Direction: response
[2014-01-06 19:28:38,441] ERROR - SourceHandler I/O error: An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
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:202)
at sun.nio.ch.IOUtil.read(IOUtil.java:175)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
at org.apache.http.nio.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:348)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:376)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady
[2014-01-06 19:29:14,051] WARN - TargetHandler http-outgoing-66: Connection time out while in state: REQUEST_DONE
[2014-01-06 19:29:14,061] WARN - EndpointContext Endpoint : AnonymousEndpoint will be marked SUSPENDED as it failed
[2014-01-06 19:29:15,041] WARN - EndpointContext Suspending endpoint : AnonymousEndpoint - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Mon
[2014-01-06 19:29:14,451] WARN - SourceHandler Connection time out after request is read: http-incoming-57
我说的是,它在后端超时;但我在 faultSeuence 中记录了响应。
我注意到问题是由代理实现中的 XSLT 中介引起的,因为当我删除 xslt 中介时,日志是空的。我尝试了 xquery,它是一样的。甚至 outSequence 中的日志中介也会导致此问题。
这是我的最终代理。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="GetUserProxy" transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint>
<address uri="https://localhost:9443/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap12Endpoint/"/>
</endpoint>
<inSequence/>
<outSequence>
<log/>
<send/>
</outSequence>
<faultSequence/>
</target>
</proxy>
当我删除日志中介时,WARN 消息会从日志中消失,所有响应消息都会返回给 SoapUI。
谁能告诉我为什么它会这样? 非常感谢。 大卫
【问题讨论】: