java – “部署到sonatype时收到致命警报:bad_record_mac”

前端之家收集整理的这篇文章主要介绍了java – “部署到sonatype时收到致命警报:bad_record_mac”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试部署到sonatype存储库(有时!)时,我得到此堆栈跟踪:
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1977)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1093)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1328)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:151)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon$RequestEntityImplementation.writeTo(AbstractHttpClientWagon.java:188)
at org.apache.maven.wagon.providers.http.httpclient.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.maven.wagon.providers.http.httpclient.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.maven.wagon.providers.http.httpclient.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
at org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:674)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:515)

根据建议here,我设定:

MAVEN_OPTS="-Dhttps.protocols=SSLv3 -Dforce.http.jre.executor=true"

它仍然没有帮助.我在用着:

$java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.2-b09,mixed mode)

有任何想法吗?

PS.我在jdk7-dev mailing list问了同一个问题,但还没有得到任何有用的答案.

解决方法

自2013年1月19日起重新尝试Sonatype OSS配置已被调整,这可能解决了此问题.

参考:https://issues.sonatype.org/browse/OSSRH-5165

猜你在找的Java相关文章