【发布时间】:2011-12-30 13:49:15
【问题描述】:
我正在使用 Apache CXF 客户端,在 Windows Java 1.6.0_29-b11 VM 中运行以连接到 IBM 大型机(我相信它是 zSeries),并调用在那里运行的 SOAP Web 服务。连接是通过 SSL/TLS 完成的,并且大部分时间都可以正常工作。
但是,我有时会遇到带有bad record MAC 消息的 SSL 异常。这是使用 javax.net.debug 属性的程序的输出。
2011-11-16 12:32:37,731 INFO LoggingOutInterceptor: Outbound Message
---------------------------
ID: 29
Address: https://1.2.3.4/access/servlet/blabla.atk123
Encoding: UTF-8
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=["Blablaaction/ATK123.Execute"]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ATK123.Execute xmlns="Blabla"><Usrid>WA</Usrid><Usrpwd>54321</Usrpwd><Ultautid>9999</Ultautid></ATK123.Execute></soap:Body></soap:Envelope>
--------------------------------------
pool-1-thread-1, setSoTimeout(30000) called
pool-1-thread-1, WRITE: TLSv1 Application Data, length = 321
pool-1-thread-1, WRITE: TLSv1 Application Data, length = 262
pool-1-thread-1, READ: TLSv1 Application Data, length = 483
pool-1-thread-1, READ: TLSv1 Application Data, length = 16148
pool-1-thread-1, READ: TLSv1 Application Data, length = 282
%% Invalidated: [Session-1, SSL_RSA_WITH_RC4_128_SHA]
pool-1-thread-1, SEND TLSv1 ALERT: fatal, description = bad_record_mac
pool-1-thread-1, WRITE: TLSv1 Alert, length = 22
pool-1-thread-1, called closeSocket()
pool-1-thread-1, handling exception: javax.net.ssl.SSLException: bad record MAC
2011-11-16 12:32:38,511 WARN PhaseInterceptorChain: Interceptor for {Blabla}ATK123#{Blabla}Execute has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: bad record MAC
at org.apache.cxf.interceptor.LoggingInInterceptor.logging(LoggingInInterceptor.java:144)
at org.apache.cxf.interceptor.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:73)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:797)
.... (more stuff)
不幸的是,我无法在服务器上修改或调试端点。
这可能是什么原因造成的?
如何隔离和修复此行为?
【问题讨论】:
-
这是通过无线连接吗?
-
这是光纤连接。虽然不太稳定..
-
如果您注意到每个坏记录 mac 错误大约有 40 亿个失败的 TCP 校验和,这很容易解释。
-
我认为更可能的原因是以下 Java 错误:bugs.openjdk.java.net/browse/JDK-4615819(它已有十年之久,但从未在客户端修复)
标签: java sockets networking ssl