2014-08-29 4 views
4

У меня есть поток с входящим запросом/ответом HTTPS, который принимает сообщение с данными XML (порт 8081). Я обрабатываю данные, а затем хочу выполнить другую запись HTTPS через 443 на другой URL-адрес, чтобы данные обрабатывались внешним процессом (PeopleSoft IB).Mule - Не удалось выполнить маршрут через HTTPS Конечная точка

Проблема в том, что при попытке отправить сообщение на HTTPS: 443 исходящее из HTTPS: 8081 входящее, я получаю приведенную ниже ошибку.

НО, если у меня есть входящий разъем установлен как HTTP и не HTTPS и закомментируйте https: имя соединителя = «httpsConnector» У меня есть настройки, все работает отлично, и я могу отправить на HTTPS/443 конечная точка.

Я искал высоко и низко и пробовал много разных вещей, чтобы попытаться обойти эту ошибку, но все попытки до сих пор потерпели неудачу. Я знаю, что это имеет какое-то отношение к полезной нагрузке, поскольку MuleSoft отказывается от нее и никогда не переходит к конечной точке HTTPS. Я подтвердил это, изменив полезную нагрузку на обычный текст, и он был успешно отправлен. Он также отправляется успешно, как я уже отмечал выше, когда я вхожу в HTTP с 8081.

Я - неофит MuleSoft, поэтому, если это простое исправление, пожалуйста, извините мое невежество.

Основная ошибка

Failed to route event via endpoint: 
DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW 
/HttpListeningConnector, connector=HttpsConnector { name=httpsConnector lifecycle=start 
this=3a2b2faa numberOfConcurrentTransactedReceivers=4 
createMultipleTransactedReceivers=true connected=true supportedProtocols=[https] 
serviceOverrides= session.handler=org.mule.session.NullSessionHandler 
message.factory=org.mule.transport.http.HttpMuleMessageFactory } , 
name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector', 
mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST}, 
transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, 
deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, 
endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: 
PostMethod 

Поймать Ошибка

Could not find a transformer to transform 
"SimpleDataType{type=org.apache.commons.httpclient.methods.PostMethod, 
mimeType='text/xml'}" to "SimpleDataType{type=org.mule.api.transport.OutputHandler, 
mimeType='*/*'}". (org.mule.api.transformer.TransformerException) 
(org.mule.api.transformer.TransformerException). The current MuleMessage is null! Please 
report this to [email protected] 
(org.mule.api.transformer.TransformerMessagingException). Message payload is of type: 
PostMethod 

Вход Подробности

+ Started app 'checklisttest'        + 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
INFO 2014-08-29 04:20:04,623 [[checklisttest].httpsConnector.receiver.02] org.mule.api.processor.LoggerMessageProcessor: 
org.mule.DefaultMuleMessage 
{ 
    id=6cca1ad0-2f6e-11e4-89b1-001c42000009 
    payload=org.apache.commons.httpclient.ContentLengthInputStream 
    correlationId=<not set> 
    correlationGroup=-1 
    correlationSeq=-1 
    encoding=UTF-8 
    exceptionPayload=<not set> 

Message properties: 
    INVOCATION scoped properties: 
    Content-Type=text/xml 
    INBOUND scoped properties: 
    Accept=*/* 
    Accept-Encoding=gzip,deflate 
    Accept-Language=en-US,en;q=0.8 
    Cache-Control=no-cache 
    Connection=true 
    Content-Length=632 
    Content-Type=text/xml 
    Host=localhost:8082 
    Keep-Alive=true 
    MULE_ORIGINATING_ENDPOINT=endpoint.https.localhost.8082.checklist.v1 
    MULE_REMOTE_CLIENT_ADDRESS=/127.0.0.1:56585 
    Origin=chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop 
    Postman-Token=721feb2b-281c-382e-169d-2c2792153944 
    User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36 
    http.context.path=/checklist_v1 
    http.context.uri=https://localhost:8082/checklist_v1 
    http.headers={Origin=chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop, Keep-Alive=true, Accept=*/*, Connection=true, User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36, Host=localhost:8082, Accept-Encoding=gzip,deflate, Cache-Control=no-cache, Postman-Token=721feb2b-281c-382e-169d-2c2792153944, Accept-Language=en-US,en;q=0.8, Content-Length=632, Content-Type=text/xml} 
    http.method=POST 
    http.query.params={} 
    http.query.string= 
    http.relative.path= 
    http.request=/checklist_v1 
    http.request.path=/checklist_v1 
    http.version=HTTP/1.1 
    OUTBOUND scoped properties: 
    LOCAL_CERTIFICATES=[Ljava.security.cert.X509Certificate;@59884baf 
    MULE_ENCODING=UTF-8 
    SESSION scoped properties: 
} 
INFO 2014-08-29 04:20:04,636 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest 
INFO 2014-08-29 04:20:04,642 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse 
INFO 2014-08-29 04:20:04,643 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest 
INFO 2014-08-29 04:20:04,643 [[checklisttest].httpsConnector.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'httpsConnector.dispatcher.699512478'. Object is: HttpsClientMessageDispatcher 
INFO 2014-08-29 04:20:04,645 [[checklisttest].httpsConnector.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'httpsConnector.dispatcher.699512478'. Object is: HttpsClientMessageDispatcher 
INFO 2014-08-29 04:20:04,660 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest: Content-Type not set on outgoing request, defaulting to: text/plain 
ERROR 2014-08-29 04:20:04,698 [[checklisttest].httpsConnector.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
******************************************************************************** 
Message    : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW/HttpListeningConnector, connector=HttpsConnector 
{ 
    name=httpsConnector 
    lifecycle=start 
    this=3a2b2faa 
    numberOfConcurrentTransactedReceivers=4 
    createMultipleTransactedReceivers=true 
    connected=true 
    supportedProtocols=[https] 
    serviceOverrides= 
    session.handler=org.mule.session.NullSessionHandler 
    message.factory=org.mule.transport.http.HttpMuleMessageFactory 
} 
, name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector', mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod 
Code     : MULE_ERROR--2 
-------------------------------------------------------------------------------- 
Exception stack is: 
1. The server corp853.dev.corp.edu failed to respond (org.apache.commons.httpclient.NoHttpResponseException) 
    org.apache.commons.httpclient.HttpMethodBase:1976 (null) 
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW/HttpListeningConnector, connector=HttpsConnector 
{ 
    name=httpsConnector 
    lifecycle=start 
    this=3a2b2faa 
    numberOfConcurrentTransactedReceivers=4 
    createMultipleTransactedReceivers=true 
    connected=true 
    supportedProtocols=[https] 
    serviceOverrides= 
    session.handler=org.mule.session.NullSessionHandler 
    message.factory=org.mule.transport.http.HttpMuleMessageFactory 
} 
, name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector', mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException) 
    org.mule.transport.http.HttpClientMessageDispatcher:151 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html) 
-------------------------------------------------------------------------------- 
Root Exception stack trace: 
org.apache.commons.httpclient.NoHttpResponseException: The server corp853.dev.corp.edu failed to respond 
     at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976) 
     at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) 
     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) 
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) 
******************************************************************************** 

Мои проект XML:

<?xml version="1.0" encoding="UTF-8"?> 

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" 
xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns="http://www.mulesoft.org/schema/mule/core" 
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd"> 
<https:connector name="httpsConnector" clientSoTimeout="10000" 
    cookieSpec="netscape" doc:name="HTTP-HTTPS" proxyHostname="localhost" 
    receiveBacklog="0" receiveBufferSize="0" sendBufferSize="0" 
    serverSoTimeout="10000" socketSoLinger="0" validateConnections="true"> 
    <service-overrides messageFactory="org.mule.transport.http.HttpMuleMessageFactory" 
     sessionHandler="org.mule.session.NullSessionHandler" /> 
    <https:tls-client path="${corp.folder}/conf/mulekeystore.jks" 
     storePassword="pwd" /> 
    <https:tls-key-store path="${corp.folder}/conf/mulekeystore.jks" 
     keyPassword="pwd" storePassword="pwd" /> 
    <https:tls-server path="${corp.folder}/conf/mulekeystore.jks" 
     storePassword="pwd" /> 
</https:connector> 
<spring:beans> 
    <spring:bean id="corpProperties" 
     class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
     <spring:property name="ignoreUnresolvablePlaceholders" 
      value="true" /> 
     <spring:property name="location" value="classpath:custom.properties" /> 
     <!-- Added to support multiple placeholders --> 
    </spring:bean> 
</spring:beans> 
<flow name="checklisttestFlow1" doc:name="checklisttestFlow1"> 
    <https:inbound-endpoint exchange-pattern="request-response" 
     host="localhost" port="8082" doc:name="HTTP" contentType="text/xml" 
     connector-ref="httpsConnector" path="checklist_v1" /> 
    <logger level="INFO" doc:name="Logger" /> 
    <https:outbound-endpoint exchange-pattern="request-response" 
     host="corp853.dev.corp.edu" port="443" path="PSIGW/HttpListeningConnector" 
     method="POST" doc:name="HTTP" /> 
</flow> 
</mule> 

ответ

0

Я никогда не видел эту точную ошибку, но я думаю, что у меня есть идея, что может помочь. Попробуйте добавить трансформатор «объект-строка» после входящей конечной точки https.

+0

Спасибо, что посмотрели на это для меня. Попытка, к сожалению, произвести ту же ошибку. Обратите внимание, что я отправил эту проблему в поддержку MuleSoft. Как только я получу разрешение, я отправлю его здесь. –

1

Для всех этих любопытных эта проблема сводилась к созданию хранилища ключей, настроенного с соответствующим сертификатом для исходящей конечной точки HTTPS. Это было обнаружено при поддержке MuleSoft.

Что было сделано, чтобы понять это было:

  1. Добавление log4j.logger.httpclient.wire = DEBUG в log4j.properties, а затем добавить этот файл SRC/основные/ресурсов (я бегу на месте)
  2. Удаление локальный прокси-сервер, как от исходящего соединителя HTTPS

Это показало следующее в след, который ясно показал, что проблема была.

Root Exception stack trace: 
sun.security.validator.ValidatorException: No trusted certificate found 
at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:344) 
at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:109) 
at sun.security.validator.Validator.validate(Validator.java:218) 
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) 

я ранее не имею доступ к хранилищу ключей, связанным с разъемом HTTPS исходящего (я сделал с въездным) как один является не нужна, когда я пришел, как HTTP, а затем выйти, как HTTPS.Я обнаружил, что после большой боли, что хранилище ключей - это, необходимое с входящим в качестве HTTPS и исходящим как HTTPS.

В этом исходящем хранилище HTTPS я добавил сертификат для веб-сайта (соединитель для прослушивания для PeopleSoft Integration Broker), и все хорошо.

+0

Когда вы говорите: «Чтобы хранилище хранилища было необходимо с входящим в качестве HTTPS и исходящим как HTTPS», вы в буквальном смысле означали «Нужно ли хранилище ключей с входящим HTTP и исходящим как HTTPS»? входящий HTTP не HTTPS – Sudarshan

Смежные вопросы