coveralls-gradle-plugin
coveralls-gradle-plugin copied to clipboard
javax.net.ssl.SSLProtocolException with openjdk11 on Travis
I receive a javax.net.ssl.SSLProtocolException: Connection reset by peer (Write failed) with Java 11 and also with Java 12-ea. It look like that Java 11 and newer can not communicate with your server. Here is the output from Gradle
> Task :coveralls FAILED
service name: travis-ci
service job id: 435042066
repo token: null
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':coveralls'.
> javax.net.ssl.SSLProtocolException: Connection reset by peer (Write failed)
see at https://travis-ci.org/i-net-software/jlessc/jobs/435042066
Any Idea how can solve this?
Disabling the TLS 1.3 protocol with:
-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
solved the problem.
No luck with ./gradlew -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
.
Also adding systemProp.jdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
to gradle.properties didn't help.
Versions:
------------------------------------------------------------
Gradle 5.0
------------------------------------------------------------
Build time: 2018-11-26 11:48:43 UTC
Revision: 7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987
Kotlin DSL: 1.0.4
Kotlin: 1.3.10
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 11 (Oracle Corporation 11+24-Ubuntu-118.04)
OS: Linux 4.15.0-39-lowlatency amd64
Yes, the hack does not work anymore. Today it is failing with Java 11 and Java 12.
I had a similar issue
javax.net.ssl.SSLException: Received fatal alert: record_overflow
but after adding systemProp.jdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
to gradle.properties
as @lkrnac said, the issue disappeared
I'm using OpenJDK-11, gradle 5, junit 5
@kt3k Hi, are you willing to continue maintaining this project?
@fzdy1914 Actually I want to give this project to someone who can maintain. If you're willing to take over, you're welcome.
Actually I want to give this project to someone who can maintain. If you're willing to take over, you're welcome.
I am willing to maintain it, but I am not sure how the grade plugin works and how to test it.
The underline problem of this issue is that ~the HTTPBuilder dependency used in the project is outdated and will throw an Exception when using TSL v1.3.~ a bug in JDK11's TLS v1.3 implementation causes it to send invalid data to coveralls.io [See here].
One workaround is to set the property of this plugin as below:
saveAsFile = true
sendToCoveralls = false
and add
after_success:
- curl -F 'json_file=@build/coveralls/report.json' 'https://coveralls.io/api/v1/jobs'
to .travis.yml
Any version with a fix in sight for this issue? Had success with the gradle.properties
workaround, but seems less than ideal.
Always try to use openJDK with any of the jdk-stretch versions . It adjusts the compatibility accordingly .
Github Actions + Java 13 solved this