【发布时间】: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 容器。这与讨论无关,但请记住这一点。