WSO2 - 无法将 ViaPost 发送到 url

WSO2 - Unable to sendViaPost to url

我正在使用 WSO2 ESB 通过调用中介向 Bitrix CRM 发送 JSON 消息。我查看了所有的帖子和教程,但总是遇到同样的错误: HTTPSender - 无法将 ViaPost 发送到 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.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

更新2

全栈:

[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.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)

调用调解器阻塞="true"模式中似乎有一个已知的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.