bach: Cannot download OpenJDK using install-jdk.sh
It seems that a certificate error occurs and we can not download it using install-jdk.sh.
See https://travis-ci.org/mybatis/thymeleaf-scripting/jobs/525200361 .
Probably exit code ‘51’ is SSL connection error of cURL. (https://curl.haxx.se/docs/manpage.html#51)
Current Status (inserted by @sormuras)
- 2019-04-27 Underlying reason:
NET::ERR_CERT_COMMON_NAME_INVALIDfor alldownload.java.netassets - 2019-04-28 “Delay applying a temporary workaround until … mid of the coming week.”
- 2019-04-29 Oracle/Mark Reinhold is working on it …
- 2019-04-29 Updated
install-jdk.shto usehttps://download.oracle.com/javaas the url prefix for OpenJDK assets
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 16 (10 by maintainers)
Commits related to this issue
- Workaround OpenJDK installation problem on Travis CI See https://github.com/sormuras/bach/issues/51 — committed to bwaldvogel/liblinear-java by bwaldvogel 8 years ago
- Use image that comes with openjdk11 by default https://github.com/sormuras/bach/issues/51#issuecomment-487382675 — committed to kaklakariada/portmapper by kaklakariada 8 years ago
- Use image that comes with openjdk11 by default https://github.com/sormuras/bach/issues/51#issuecomment-487382675 — committed to itsallcode/white-rabbit by kaklakariada 8 years ago
- Get JDK11 working by requiring Ubuntu Xenial. My previous attempt at JDK11 did not work, but this one I actually tested with https://github.com/google/truth/pull/583 Solution courtesy of https://git... — committed to cpovirk/truth by cpovirk 7 years ago
- Get JDK11 working by requiring Ubuntu Xenial. My previous attempt at JDK11 did not work, but this one I actually tested with https://github.com/google/truth/pull/583 Solution courtesy of https://git... — committed to google/truth by cpovirk 7 years ago
From https://jdk.java.net/archive/ to https://jdk.java.net/13/ all download links now start with
https://download.oracle.com– will updateinstall-jdk.shaccordingly.I have the same issue with my travis-ci build (https://travis-ci.org/kaklakariada/portmapper/builds/525556095). I use
openjdk11in .travis.yml.Would be possible to download openjdk from https://adoptopenjdk.net/ instead of https://jdk.java.net? AdoptOpenJDK provides OpenJDK builds with LTS and security updates and has an provides an API for getting the latest versions.
Feels like a band-aid, @karussell – and I guess, Oracle will fix the underlying issue soon. So, I’ll delay applying a temporary workaround until … mid of the coming week.
For now, you may resort to the
--urloption ofinstall-jdk.sh. Here you may specify a.tar.gzJDK of your choice. See https://github.com/sormuras/sormuras.github.io/blob/master/.travis.yml#L25-L47 for example usages. AdoptOpenJDK and others are supported.@Travis-CI should really provide (more) “pre-installed” Java versions. Like they do with their XENIAL distro.
openjdk10andopenjdk11don’t rely oninstall-jdk.sh: https://docs.travis-ci.com/user/reference/xenial/#jvm-clojure-groovy-java-scala-supportMy initial motivation for writing
install-jdk.shwas to get a handle to the latest and greatest EA version of OpenJDK. Those EA versions are updated every week or two, thus it makes sense to download and install it “on-the-fly”. JDK versions that are GA or even archived should be downloaded and installed once and used many times.fup2 https://mail.openjdk.java.net/pipermail/web-discuss/2019-April/000567.html
Good to know, Thomas.
But still, I consider this an issue of “other parties”: Oracle/java.net and Travis CI. And it shows, that moving JUnit 5 CI builds to @microsoft 's Azure Pipelines was a good move. /cc @brunoborges
Perhaps, users of Travis CI should resort to use raw
install-jdk.shfor now. With that, you’re able to select “every”.tar.gzJDK distribution out there. Something like the following.travis.ymlscaffold loading AdoptOpenJDK 12 (hotspot):@kaklakariada In your case, i.e. when only using
openjdk11at Travis CI, I recommend usingdist: xenialand not specifying a jdk. You’ll getopenjdk11by default. See https://github.com/sormuras/bach/blob/a962824b95231a27c9a11d55ff946038a7490ec7/.travis.yml for an example.The following temporary workaround in install-jdk.sh seems to make it:
“Working on it …” https://twitter.com/mreinhold/status/1122796286544097280