WSO2 - 無法將ViaPost 發送到 url (WSO2 - Unable to sendViaPost to url)


問題描述

WSO2 ‑ 無法將ViaPost 發送到 url (WSO2 ‑ Unable to sendViaPost to url)

我正在使用 WSO2 ESB 通過呼叫中介將 JSON 消息發送到 Bitrix CRM。我查看了所有帖子和教程,但總是遇到相同的錯誤:HTTPSender ‑ Unable to sendViaPost to url 在我將 Bitrix24 切換為使用 Nginx Push 後,我在 ESB 上遇到了以下問題。

TID[‑1234] [EI] [2020‑02‑11 07:04:01,702] INFO {org.apache.axis2.transport.http.HTTPSender} ‑ Unable to sendViaPost to url[https://xxxx.com/rest/update?id=33826] 
org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.verifyHostname(TLSProtocolSocketFactory.java:233) 
org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:194) 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) 
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
 org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199) 
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81) 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459) 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286) 
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441) 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227) org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) 
org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:490)
 org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:382) 
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:88) 
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85) 
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547) 
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384) 
org.apache.synapse.endpoints.HTTPEndpoint.send(HTTPEndpoint.java:85) 
org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:164) 
org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:119) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70) 
org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37) 
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70) 
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70) 
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70) 
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) 
org.apache.synapse.mediators.builtin.ForEachMediator.mediateSequence(ForEachMediator.java:183) 
org.apache.synapse.mediators.builtin.ForEachMediator.mediate(ForEachMediator.java:145) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108) 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70) 
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) 
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:224) 
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:415) 
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) 
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
java.lang.Thread.run(Thread.java:748)

我的呼叫調解員看起來像:

 <property description="messageType JSON"
                                           name="messageType"
                                           scope="axis2"
                                           type="STRING"
                                           value="application/json"/>
                                 <call blocking="true">
                                    <endpoint>
                                       <http method="POST"
                                             statistics="enable"
                                             trace="enable"
                                             uri‑template="{uri.var.RESTURL}">
                                          <suspendOnFailure>
                                             <errorCodes>400</errorCodes>
                                             <initialDuration>0</initialDuration>
                                             <progressionFactor>1.0</progressionFactor>
                                             <maximumDuration>0</maximumDuration>
                                          </suspendOnFailure>
                                       </http>
                                    </endpoint>
                                 </call>

我嘗試使用 Postman 發送相同的消息,它工作正常。感謝您的幫助。

更新

管理面板中的日誌未滿。我在服務器上手動檢查過,問題出在:javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

UPDATE2

全棧:

[2020‑02‑11 22:18:01,953] [EI‑Core]  INFO ‑ HTTPSender Unable to sendViaPost to url[https:/xxxx.com/rest/7]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
        at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:450)
        at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:276)
        at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:186)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:490)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:382)
        at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:88)
        at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
        at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
        at org.apache.synapse.endpoints.HTTPEndpoint.send(HTTPEndpoint.java:85)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:164)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:119)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.mediators.builtin.ForEachMediator.mediateSequence(ForEachMediator.java:183)
        at org.apache.synapse.mediators.builtin.ForEachMediator.mediate(ForEachMediator.java:145)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:224)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:415)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

參考解法

方法 1:

There seems to be a known issue in Call mediator blocking="true" mode. Please try out the work around suggested in the issue.

As a workaround for this, we can disable switching to opensaml http client by setting rampart.axiom.parser.pool=false in a server start up.

(by sz3jdiiArunan Sugunakumar)

參考文件

  1. WSO2 ‑ Unable to sendViaPost to url (CC BY‑SA 2.5/3.0/4.0)

#wso2-enterprise-integrator #esb #wso2-esb #wso2 #axis2






相關問題

WSO2 EI 和節點 JS (WSO2 EI and NODE JS)

在我的本地計算機上重建 WSO2 存儲庫的正確順序 (The correct order to rebuild the WSO2 repositories on my local computer)

如何為 WSO2 EI 代理服務配置 HTTP 基本身份驗證 (How to Configure HTTP Basic Auth for WSO2 EI proxy service)

WSO2 EI 6.5 - 名稱或服務未知 | DefaultAddressPicker [LOCAL] [wso2.ei.domain] [3.5.4] 集成商名稱或服務未知 (WSO2 EI 6.5 - Name or service not known | DefaultAddressPicker [LOCAL] [wso2.ei.domain] [3.5.4] integrator Name or service not known)

如何更改 WSO2 中 wso2api/repository/logs 目錄下 http_access_.log 文件中的日誌模式 (How to change log pattern in http_access_.log file under the directory wso2api/repository/logs in WSO2)

WSO2 - 無法將ViaPost 發送到 url (WSO2 - Unable to sendViaPost to url)

WSO2 ESB:如何處理端點返回的內部錯誤 (WSO2 ESB: How to handle internal error returned by an endpoint)

WSO2 ESB:無法從註冊表加載數據庫連接屬性 (WSO2 ESB: Unable to load DB connection properties from registry)

添加連接器 WSO2 Enterprise Integrator (Add connectors WSO2 Enterprise Integrator)

我可以在 Enterprise Integrator 6.6.0 WSO2 中添加外部 swagger api 文檔嗎? (Can I add an external swagger api document in Enterprise Integrator 6.6.0 WSO2?)

WSO2 APIM 和 EI 是否支持 API 刪除現有租戶? (Does WSO2 APIM and EI support API to delete an existing tenant?)

WSO2 ESB 7.1.0 二進制響應被截斷為 375B (WSO2 ESB 7.1.0 Binary response is truncated to 375B)







留言討論