kt3k / coveralls-gradle-plugin

👨‍🔧 gradle plugin for coveralls
https://plugins.gradle.org/plugin/com.github.kt3k.coveralls
MIT License
253 stars 54 forks source link

javax.net.ssl.SSLProtocolException with openjdk11 on Travis #85

Open Horcrux7 opened 6 years ago

Horcrux7 commented 6 years ago

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?

Horcrux7 commented 6 years ago

Disabling the TLS 1.3 protocol with:

-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"

solved the problem.

lkrnac commented 5 years ago

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
Horcrux7 commented 5 years ago

Yes, the hack does not work anymore. Today it is failing with Java 11 and Java 12.

apulbere commented 5 years ago

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

fzdy1914 commented 5 years ago

@kt3k Hi, are you willing to continue maintaining this project?

kt3k commented 5 years ago

@fzdy1914 Actually I want to give this project to someone who can maintain. If you're willing to take over, you're welcome.

fzdy1914 commented 5 years ago

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.

fzdy1914 commented 5 years ago

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

Ondkloss commented 5 years ago

Any version with a fix in sight for this issue? Had success with the gradle.properties workaround, but seems less than ideal.

Usha3012 commented 5 years ago

Always try to use openJDK with any of the jdk-stretch versions . It adjusts the compatibility accordingly .

hurricup commented 4 years ago

Github Actions + Java 13 solved this