当我从客户端向ESB发送请求时,我正在运行ESB Mule 3.7.0我收到以下错误:
<https:connector name="httpsConnector" doc:name="HTTP\HTTPS" clientSoTimeout="10000" cookieSpec="netscape" receiveBacklog="0" receiveBufferSize="0" sendBufferSize="0" serverSoTimeout="10000" socketSoLinger="0" validateConnections="true">
<receiver-threading-profile maxThreadsActive="${connector.https.maxThreadsActive}" />
<https:tls-key-store path="${tls.keystore.location}" keyPassword="${tls.keystore.password}" storePassword="${tls.keystore.password}"/>
<https:tls-server path="${tls.keystore.location}" storePassword="${tls.keystore.password}"/>
</https:connector>
我的https 连接器配置如下:
<https:inbound-endpoint exchange-pattern="request-response" host="${httpInbound.secure.host}" port="${httpInbound.secure.port}" doc:name="HTTPS Service" path="${httpInbound.contextRoot}/${external.serviceName}" responseTimeout="${service.timeout}" connector-ref="httpsConnector">
<mule-ss:http-security-filter realm="mule-realm"/>
<mule-ss:authorization-filter requiredAuthorities="PUBLIC" />
</https:inbound-endpoint>
和 https:inbound-endpoint 定义为:
SSLHandshakeException: Remote host closed connection
为什么在握手期间收到{{1}}?有任何想法吗?
答案 0 :(得分:1)
检查https连接器配置中的证书信息我使用了以下stepes及其正常工作
<http:request-config name="SharedHttpsRequestConfig" protocol="HTTPS">
<tls:context>
<tls:trust-store path="${tls.trust.store}" password="${tls.trust.store.password}"/>
<tls:key-store path="${tls.trust.store}" password="${tls.trust.store.password}" keyPassword="${tls.trust.store.key.password}"/>
</tls:context>
</http:request-config>
然后我在我的流程中使用了上面的https连接器来调用https服务
<http:request config-ref="SharedHttpsRequestConfig"
port="${https.port}" host="#[MYMAP.get('DOMAINS')]"
path="/api/${version}/${.url}"
parseResponse="false" responseTimeout="${es.mule.http.timeout}"
method="POST" doc:name="Service">
答案 1 :(得分:0)
远程主机可能不喜欢您发送给它的内容,因此初始TLS握手失败。可能有很多原因,例如:
我不认为可以根据您提供的信息提取确切的原因。但是,由于服务器关闭了连接,我建议在服务器端查看错误(日志文件等)。您也可以尝试与其他客户端连接到服务器,以查看问题是否与客户端配置相关或更多与服务器配置有关。