Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up9-jdk image has SSL issues #145
Comments
This comment has been minimized.
This comment has been minimized.
The same test with 9-jre fails with
|
This comment has been minimized.
This comment has been minimized.
aiannucci
commented
Sep 11, 2017
Faced same issue today with latest image 9-jdk |
This comment has been minimized.
This comment has been minimized.
Works fine with |
This comment has been minimized.
This comment has been minimized.
mjw99
commented
Sep 13, 2017
Seeing this downstream with a Maven project on Bitbucket's pipelines. |
This comment has been minimized.
This comment has been minimized.
carlossg
commented
Sep 21, 2017
Easy reproducer with maven image in carlossg/docker-maven#50
|
This comment has been minimized.
This comment has been minimized.
queer
commented
Sep 25, 2017
Seeing this in the current 9-jre image as well. |
This comment has been minimized.
This comment has been minimized.
eolivelli
commented
Oct 2, 2017
I got this issue as well |
This comment has been minimized.
This comment has been minimized.
philwebb
commented
Oct 3, 2017
https://twitter.com/CedricChampeau/status/913679310896156672 |
This comment has been minimized.
This comment has been minimized.
chiralsoftware
commented
Oct 5, 2017
My workaround to this: I have JDK 8 installed. I went in to JDK9_HOME/lib/security and did:
Problem solved. The cacerts file that comes with 181 is empty. After making that fix, Maven works as expected. |
This comment has been minimized.
This comment has been minimized.
@chiralsoftware, I apparently don't understand how that fixes it; the file $ docker run -it --rm openjdk:9-jdk bash
root@c555aa9be1c4:/# find / -name cacerts
/etc/default/cacerts
/etc/ssl/certs/java/cacerts
/usr/lib/jvm/java-9-openjdk-amd64/lib/security/cacerts
root@c555aa9be1c4:/# ls -l /usr/lib/jvm/java-9-openjdk-amd64/lib/security/cacerts
lrwxrwxrwx 1 root root 27 Aug 24 17:15 /usr/lib/jvm/java-9-openjdk-amd64/lib/security/cacerts -> /etc/ssl/certs/java/cacerts
root@c555aa9be1c4:/# exit |
This comment has been minimized.
This comment has been minimized.
chiralsoftware
commented
Oct 5, 2017
@yosifkit , I installed from the .tar.gz file
That did not create the link when I untarred it. Creating that link fixed it. I haven't tried the other package files. |
This comment has been minimized.
This comment has been minimized.
@chiralsoftware, I understand, this image uses the Debian packaging for openjdk, not the tar-gz file directly (we get many more architectures that way). |
This comment has been minimized.
This comment has been minimized.
I did much regression testing using snapshot.debian.org to install openjdk-9-jdk at the same version, diff /tmp/0906-java.txt /tmp/0907-java.txt
94c94,95
< ii libegl1-mesa:amd64 17.1.5-1 amd64 free implementation of the EGL API -- runtime
---
> ii libegl-mesa0:amd64 17.2.0-1 amd64 free implementation of the EGL API -- Mesa vendor library
> ii libegl1:amd64 0.2.999+git20170802-3 amd64 Vendor neutral GL dispatch library -- EGL support
105c106
< ii libgbm1:amd64 17.1.5-1 amd64 generic buffer management API -- runtime
---
> ii libgbm1:amd64 17.2.0-1 amd64 generic buffer management API -- runtime
112,114c113,116
< ii libgl1-mesa-dri:amd64 17.1.5-1 amd64 free implementation of the OpenGL API -- DRI modules
< ii libgl1-mesa-glx:amd64 17.1.5-1 amd64 free implementation of the OpenGL API -- GLX runtime
< ii libglapi-mesa:amd64 17.1.5-1 amd64 free implementation of the GL API -- shared library
---
> ii libgl1:amd64 0.2.999+git20170802-3 amd64 Vendor neutral GL dispatch library -- legacy GL support
> ii libgl1-mesa-dri:amd64 17.2.0-1 amd64 free implementation of the OpenGL API -- DRI modules
> ii libgl1-mesa-glx 17.2.0-1 amd64 transitional dummy package
> ii libglapi-mesa:amd64 17.2.0-1 amd64 free implementation of the GL API -- shared library
116a119,121
> ii libglvnd0:amd64 0.2.999+git20170802-3 amd64 Vendor neutral GL dispatch library
> ii libglx-mesa0:amd64 17.2.0-1 amd64 free implementation of the OpenGL API -- GLX vendor library
> ii libglx0:amd64 0.2.999+git20170802-3 amd64 Vendor neutral GL dispatch library -- GLX support
144c149
< ii libllvm4.0:amd64 1:4.0.1-3 amd64 Modular compiler and toolchain technologies, runtime library
---
> ii libllvm5.0:amd64 1:5.0-1 amd64 Modular compiler and toolchain technologies, runtime library
199c204
< ii libwayland-egl1-mesa:amd64 17.1.5-1 amd64 implementation of the Wayland EGL platform -- runtime
---
> ii libwayland-egl1-mesa:amd64 17.2.0-1 amd64 implementation of the Wayland EGL platform -- runtime I don't really know which of these packages could affect the java ca-certificates file generation. |
This comment has been minimized.
This comment has been minimized.
fdesu
commented
Oct 6, 2017
•
The same on my Fedora 26. Making a symlink to upd: not really helped |
This comment has been minimized.
This comment has been minimized.
@fdesu @chiralsoftware please take discussions of upstream's broken release tarball elsewhere; this issue is discussing a separate issue with the |
pushed a commit
to hrytsenko-sigma/ping
that referenced
this issue
Oct 8, 2017
added a commit
to donald-w/sample-java9-modules-maven
that referenced
this issue
Oct 9, 2017
aaron-haskins
referenced this issue
Oct 10, 2017
Closed
Tests in client-hc module do not run with JDK9 #1167
This comment has been minimized.
This comment has been minimized.
Given @yosifkit's diff in #145 (comment), it appears this is somehow related to OpenGL, which is bizarre. That diff (with the timestamps for http://snapshot.debian.org) is probably enough for filing an issue in Debian (https://bugs.debian.org/src:openjdk-9) to see if the Debian Java team can make heads or tails of what's going on here (and why it works with |
This comment has been minimized.
This comment has been minimized.
freakyy85
commented
Oct 14, 2017
•
having the same problem. would be nice if this could be fixed. thanks. gradlew for example doesnt work making ci builds impossible. |
This comment has been minimized.
This comment has been minimized.
freakyy85
commented
Oct 15, 2017
or does anyone know a fix for this? |
This comment has been minimized.
This comment has been minimized.
snakey1980
commented
Oct 15, 2017
•
@freakyy85 Is it possible for your CI builder to use one of the -slim ones? I switched to 9-jdk-slim to fix my builds. |
This comment has been minimized.
This comment has been minimized.
freakyy85
commented
Oct 15, 2017
oh yes i can. thanks the slim versions have fixed everything!! :) |
This comment has been minimized.
This comment has been minimized.
aaron-haskins
commented
Oct 19, 2017
@philwebb, you are right, cacerts keystore is empty in OpenJDK 9. It is a known issue, see here for more details. |
binblee
referenced this issue
Nov 25, 2017
Merged
update java version detector and maven rigging to support java 9 #16
added a commit
to circleci/circleci-images
that referenced
this issue
Dec 4, 2017
This comment has been minimized.
This comment has been minimized.
mikaelhg
commented
Feb 14, 2018
@sureshg Are you sure that the bug you quoted is relevant to this case, as the relevant images use Debian's way of populating the cacerts file in any case? If the file is missing when Debian's cacerts generation is called, the JDK9 defaults to creating a |
This comment has been minimized.
This comment has been minimized.
oflebbe
commented
Apr 15, 2018
One part of the upstream issue is resolved, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894979 . |
added a commit
to norrs/secor
that referenced
this issue
Apr 20, 2018
norrs
referenced this issue
Apr 20, 2018
Merged
Enhancement in container runtime + Dockerfile issue with SSL certs #409
dependabot
bot
referenced this issue
Apr 23, 2018
Merged
build: bump org.yaml:snakeyaml from 1.20 to 1.21 #47
This comment has been minimized.
This comment has been minimized.
sohailalam2
commented
Apr 25, 2018
Hello... what's the ETA for resolving this issue? I am having the same issue with java 9 in docker javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1969) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[na:na]
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) ~[httpclient-4.5.5.jar!/:4.5.5] |
This comment has been minimized.
This comment has been minimized.
mikaelhg
commented
Apr 25, 2018
Well, it's been resolved in upstream, because rebuilding 9-jdk from what's in the repo currently produces a working cacerts file. We'd only need someone to rebuild and reupload the official docker-library images. |
This comment has been minimized.
This comment has been minimized.
Doing However, this rebuild will happen following the merge of docker-library/official-images#4281. |
wglambert
added
the
Issue
label
Apr 25, 2018
This comment has been minimized.
This comment has been minimized.
mikaelhg
commented
Apr 28, 2018
•
Somewhat off topic: the new WorkaroundUsed @kurtbrose's /usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
/var/lib/dpkg/info/ca-certificates-java.postinst configure |
dependabot
bot
referenced this issue
May 1, 2018
Merged
build: bump org.yaml:snakeyaml from 1.20 to 1.21 #378
This comment has been minimized.
This comment has been minimized.
koppor
commented
May 2, 2018
Another workaround with all certificates available (from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894979)
|
This comment has been minimized.
This comment has been minimized.
mikaelhg
commented
May 10, 2018
•
Verified that the image Repro steps: docker pull openjdk:9-jdk
docker run -it --rm openjdk:9-jdk bash
wget https://github.com/mikaelhg/broken-docker-jdk9-cacerts/raw/master/TestHttps.class
java -cp . TestHttps "https://www.google.com/" No stack trace == success. (Also verified current |
This comment has been minimized.
This comment has been minimized.
Awesome, thanks @mikaelhg! |
tianon
closed this
May 10, 2018
wglambert
reopened this
May 10, 2018
wglambert
closed this
May 10, 2018
This comment has been minimized.
This comment has been minimized.
abelhOrihuela
commented
Jun 6, 2018
•
This work for me (React Native Stack for Android) sudo apt install openjdk-8-jre |
SpencerPark
referenced this issue
Jun 30, 2018
Open
gradlew fails to download gradle due to an SSLException on jdk-11 on ubuntu 18.04 #19
de-jcup
referenced this issue
Jul 4, 2018
Closed
Unable to install at Eclipse Photon over Marketplace #38
This comment has been minimized.
This comment has been minimized.
Benjapy
commented
Jul 8, 2018
Thanks abelhOrihuela!! it's work now!!! |
eed3si9n
referenced this issue
Jul 12, 2018
Closed
download tests fail in Scala 2.12 community build on OpenJDK 10 #54
added a commit
to gusenov/examples-java
that referenced
this issue
Jul 31, 2018
This comment has been minimized.
This comment has been minimized.
JamesYeoman
commented
Aug 30, 2018
I found that by doing an update and upgrade of apt-get, the ca-certs end up being updated and so the SSL issues were fixed |
This comment has been minimized.
This comment has been minimized.
heroInCommunity
commented
Dec 5, 2018
It seems that openjdk:11.0.1-jre-slim does not work with custom truststores( |
This comment has been minimized.
This comment has been minimized.
mikaelhg
commented
Dec 5, 2018
@heroInCommunity, it sounds like it's a different issue, so your best bet might be to open a new issue and include a reproduction. If you do, please tag me in a comment or something, as I'll need to devise a workaround if the fix is a long time coming. |
keeganwitt commentedSep 11, 2017
•
edited
9-b179-jdk image works fine, but the latest 9-jdk image is unable to make SSL connections in Java.
Here's how you can see the issue, create TestHttps.java with
and run
You'll get