wso2 esb 无法将请求转发到目标服务器

wso2 esb cannot forward request to target server

我在 Windows 服务器上安装了 ESB 4.8.1 运行。 我创建了将 HTTP 请求转发到 IIS 应用程序的代理。终点定义如下。 现在ESB可以很好的连接IIS了。 然后 IIS 服务器重新启动,ESB 无法再连接到 IIS 应用程序。

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="abcServerEndpoint">
    <address uri="@ESB_ABC_SERVER_ENDPOINT@">
        <retryConfig>
          <disabledErrorCodes>101503,101507</disabledErrorCodes>
        </retryConfig>
       <timeout> 
               <duration>300000</duration> 
               <responseAction>fault</responseAction> 
           </timeout> 
           <suspendOnFailure> 
               <errorCodes>-1</errorCodes> 
               <initialDuration>0</initialDuration> 
               <progressionFactor>0.0</progressionFactor> 
               <maximumDuration>0</maximumDuration> 
           </suspendOnFailure> 
           <markForSuspension> 
               <errorCodes>-1</errorCodes> 
           </markForSuspension> 
    </address>
</endpoint>

错误日志如下 2016-01-20 17:52:08,050 [-] [HTTP-Listener I/O dispatcher-2] WARN SourceHandler 读取请求后连接超时:http-incoming-174 2016-01-20 17:52:09,033 [-] [HTTP-Listener I/O dispatcher-1] WARN SourceHandler 读取请求后连接超时:http-incoming-180 2016-01-20 17:52:09,033 [-] [HTTP-Listener I/O dispatcher-1] WARN SourceHandler 读取请求后连接超时:http-incoming-177

WARN SourceHandler Connection time out after request is read: http-incoming-174 2016-01-20 17:52:09,033 [-]

出现上述 WARN 日志的原因是客户端(在您的场景 IIS 服务器中)与 ESB 之间的连接在 ESB 向客户端发送响应之前超时。

默认情况下,此超时为60 秒(http 侦听器的套接字超时)。所以 ESB 需要 60 多秒才能向 IIS 服务器发送响应。 此问题的原因可能是后端速度慢。

作为一种解决方案,您可以通过将以下 属性 添加到 $ESB_HOME/repository/conf/ 目录中的 passthru-http.properties 文件来增加直通 http 传输的套接字超时。

http.socket.timeout=120000

希望这些信息对您有所帮助。