【问题标题】:MULE ESB - Error HTTPS, received EOFException: errorMULE ESB - 错误 HTTPS,收到 EOFException:错误
【发布时间】:2014-01-29 01:28:33
【问题描述】:

我在 JBoss 服务器 7.0.1 中部署了 MULE ESB,并配置了 HTTPS 连接器:

<https:inbound-endpoint address="https://${ws.host}:8443/services" path="services" exchange-    pattern="request-response" connector-ref="httpConnector" responseTimeout="${ws.timeout}">
  <cxf:jaxws-service serviceClass="..." >
  </cxf:jaxws-service>
  <transformer ref="..." />
</https:inbound-endpoint>
<https:connector name="httpConnector">
        <https:tls-key-store path="/tmp/keystore.jks" keyPassword="pass" storePassword="passs"/>
        <!--https:tls-server path="/tmp/trustStore.jks" storePassword="pass"/-->
</https:connector>

客户端使用 gSoap 1.3 版。

调用web服务时,收到错误,这些是JBoss服务器的日志:

20:11:39,498 INFO  [stdout] (httpConnector.receiver.01) Allow unsafe renegotiation: true
20:11:39,499 INFO  [stdout] (httpConnector.receiver.01) Allow legacy hello messages: true
20:11:39,499 INFO  [stdout] (httpConnector.receiver.01) Is initial handshake: true
20:11:39,499 INFO  [stdout] (httpConnector.receiver.01) Is secure renegotiation: false
20:11:39,509 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, received EOFException: error
20:11:39,509 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
20:11:39,510 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, SEND TLSv1 ALERT:  fatal, description = handshake_failure
20:11:39,510 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, WRITE: TLSv1 Alert, length = 2
20:11:39,510 INFO  [stdout] (httpConnector.receiver.02) [Raw write]: length = 7
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) 0000: 15 03 01 00 02 02 28                               ......(
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called closeSocket()
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called close()
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called closeInternal(true)
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called close()
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called closeInternal(true)
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called close()
20:11:39,511 INFO  [stdout] (httpConnector.receiver.02) httpConnector.receiver.02, called closeInternal(true)
20:11:39,516 ERROR [org.mule.exception.DefaultSystemExceptionStrategy] (httpConnector.receiver.02) Caught exception in Exception Strategy: Remote host closed connection during handshake: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:882) [:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188) [:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:818) [:1.6]
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) [:1.6]
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:50) [:1.6]
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) [commons-httpclient-3.1-osgi.jar:]
    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) [commons-httpclient-3.1-osgi.jar:]
    at org.mule.transport.http.HttpServerConnection.readLine(HttpServerConnection.java:219) [mule-transport-http-3.2.1.jar:]
    at org.mule.transport.http.HttpServerConnection.readRequest(HttpServerConnection.java:185) [mule-transport-http-3.2.1.jar:]
    at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:155) [mule-transport-http-3.2.1.jar:]
    at org.mule.work.WorkerContext.run(WorkerContext.java:310) [mule-core-3.2.1.jar:]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_45]
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:462) [:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863) [:1.6]
    ... 13 more

gSoap 1.3 和 JBoss 之间是否存在兼容性问题?

提前致谢。

【问题讨论】:

  • 如果你不使用它的 HTTP/HTTPS 层,为什么要在 JBoss 中运行?
  • 我们只为 MULE 使用 JBoss(没有 server.xml 文件)只使用 Mule 配置
  • 但是您将 Mule 部署为 Web 应用程序,对吧?
  • 是的,我们将 Mule 部署为网络应用
  • 好的,我问的原因是,在这种情况下,让 Mule 在 Web 应用程序中启动自己的 HTTP 服务器没有什么意义,而将 Mule 连接到 Web 容器更合乎逻辑通过 servlet 容器。这与讨论无关,但请记住这一点。

标签: https jboss mule


【解决方案1】:

确保客户端可以访问相同的证书。

编辑:从http:inbound-endpoint 中删除path="services",因为它没有用,因为您提供了完整的address 属性。

【讨论】:

  • 感谢您的评论,客户端正在使用 OpenSSL,并使用 PEM 格式的相同证书,使用以下 cmets 从 JKS 文件生成:[keytool -export -alias mule -keystore keystore.jks -file exports-der.crt] 和 [openssl x509 -in exports-der.crt -out exports-pem.crt -outform pem -inform der]
  • 显示 SOAP 错误代码 30 但我的密码包含数字和字母
  • 您可以使用 curl 或您的浏览器通过 HTTPS 检索 WSDL 吗?尝试获取https://${ws.host}:8443/services?wsdl。你也试过SOAPui吗?只是试图进一步诊断问题。
  • 是的,我可以通过 HTTPS 检索 WSDL,我还没有尝试使用 SaopUI,我明天会测试它。
  • 很好,看来 SSL 在 Mule 方面设置正确。那么 gSoap 方面出了什么问题?
猜你喜欢
  • 1970-01-01
  • 2017-06-04
  • 2019-03-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多