WSO2 - Невозможно отправить ViaPost на URL - PullRequest
0 голосов
/ 11 февраля 2020

Я использую WSO2 ESB для отправки JSON сообщения с помощью посредника вызовов в Битрикс CRM. Я просмотрел все посты и учебные пособия, и всегда получаю одну и ту же ошибку: HTTPSender - Невозможно отправитьViaPost на URL-адрес. После того как я переключил Bitrix24 на использование Nginx Pu sh, у меня возникла следующая проблема на 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>

Я пытался отправить то же сообщение с помощью Почтальона, и он работал нормально. Спасибо за любую помощь.

ОБНОВЛЕНИЕ

Журналы в админ-панели не заполнены. Я проверил вручную на сервере, и проблема с: 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$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 Ответ

2 голосов
/ 12 февраля 2020

Кажется, есть известная проблема в режиме блокировки посредника вызова = "true". Пожалуйста, попробуйте обойти, предложенные в этом выпуске.

В качестве обходного пути для этого мы можем отключить переключение на http-клиент opensaml, установив rampart.axiom.parser.pool = false при запуске сервера. .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...