Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.net.ssl.SSLException: Received fatal alert: record_overflow #119

Closed
marcosArruda opened this issue Mar 25, 2019 · 6 comments
Closed

javax.net.ssl.SSLException: Received fatal alert: record_overflow #119

marcosArruda opened this issue Mar 25, 2019 · 6 comments

Comments

@marcosArruda
Copy link

@marcosArruda marcosArruda commented Mar 25, 2019

last week all was working normal. Today I got a javax.net.ssl.SSLException: Received fatal alert: record_overflow when PUTTING the workspace:

openjdk 11:

java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

build.gradle:

apply plugin: 'java'
apply plugin:'application'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.structurizr:structurizr-client:1.3.0'
}

mainClassName = "Structurizr"

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

sourceCompatibility = 1.11
targetCompatibility = 1.11

Action:

private static void uploadWorkspaceToStructurizr(Workspace workspace) throws Exception {
        StructurizrClient structurizrClient = new StructurizrClient(API_KEY, API_SECRET);
        structurizrClient.putWorkspace(WORKSPACE_ID, workspace);
    }

stack-trace:

INFO: Putting workspace with ID 43257
mar 25, 2019 6:46:18 PM com.structurizr.api.StructurizrClient putWorkspace
SEVERE: javax.net.ssl.SSLException: Received fatal alert: record_overflow
Exception in thread "main" com.structurizr.api.StructurizrClientException: javax.net.ssl.SSLException: Received fatal alert: record_overflow
        at com.structurizr.api.StructurizrClient.putWorkspace(StructurizrClient.java:377)
        at Structurizr.uploadWorkspaceToStructurizr(Structurizr.java:96)
        at Structurizr.main(Structurizr.java:89)
Caused by: javax.net.ssl.SSLException: Received fatal alert: record_overflow
        at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
        at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
        at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279)
        at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
        at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
        at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1155)
        at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1125)
        at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:823)
        at org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:149)
        at org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
        at org.apache.hc.core5.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:241)
        at org.apache.hc.core5.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:53)
        at org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:187)
        at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:180)
        at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:223)
        at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.execute(PoolingHttpClientConnectionManager.java:561)
        at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.execute(InternalExecRuntime.java:195)
        at org.apache.hc.client5.http.impl.classic.MainClientExec.execute(MainClientExec.java:106)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
        at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:171)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
        at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:164)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
        at org.apache.hc.client5.http.impl.classic.RetryExec.execute(RetryExec.java:87)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
        at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
        at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:125)
        at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
        at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:171)
        at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:77)
        at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:102)
        at com.structurizr.api.StructurizrClient.putWorkspace(StructurizrClient.java:365)
        ... 2 more
@marcosArruda

This comment has been minimized.

Copy link
Author

@marcosArruda marcosArruda commented Mar 25, 2019

Still unable to update my workspace.

@marcosArruda

This comment has been minimized.

Copy link
Author

@marcosArruda marcosArruda commented Mar 25, 2019

Just changed to java 8 and it worked. Something is really bad with Oracle jdk 11 and Openjdk 11 (tested both).

@matf

This comment has been minimized.

Copy link
Contributor

@matf matf commented May 29, 2019

This is actually a bug in java's SSL implementation.

See

The only workaround for the moment according to the above bug description seems to be disabling TLS1.3 via the JVM argument -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"

@matf

This comment has been minimized.

Copy link
Contributor

@matf matf commented Aug 21, 2019

@cyril4j

This comment has been minimized.

Copy link

@cyril4j cyril4j commented Sep 16, 2019

What about OpenJDK12? Any patch for it?

@matf

This comment has been minimized.

Copy link
Contributor

@matf matf commented Sep 17, 2019

The JDK issue tracker doesn't mention a backport to OpenJDK 12. Since 12 is not an LTS version and updates end this month (JDK 13 is scheduled for today) most probably this won't be patched.

rhuddleston pushed a commit to Quiq/dockerfiles that referenced this issue Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.