I am worried about the phenomenon that SSL communication is not possible in the following environment.
OS: Ubuntu 18.04
Java 1.8.0_162, 10.0.1 and so on
Error Contents
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
"Inability to communicate with SSL" at the beginning is a bit misleading.
We have verified that we can communicate as intended by including the following settings in the system properties:
- Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
- Djavax.net.ssl.trustStorePassword=changeit
·This Java is not a manual installation but an apt installation.
· cacerts
has not been specifically changed, and the password has been originally assigned, so
I looked it up, but I don't know what the problem is.
· I also tried reinstalling ca-certificates-java
, but the problem persists.
· I checked keytool-list-keystore/etc/ssl/certs/java/cacerts
and found that the certificate was included without any problems (but only when I put changeit in my password).
ASK:
I would like to know if Ubuntu needs to set the system properties one by one when using Java (which is a specification, and this is what it is), and what should I do if there is a way to make it available without setting it up?
Thank you for your cooperation.
Note:
I tried the following, but it didn't work.
sudo apt-get install ca-certificates-java
sudo update-ca-certificates-f
It looks like a bug.
https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1739631
In my environment, I was able to solve the problem by doing the following.
If you are worried, you may want to back up your cacerts
before running it.
sudorm/etc/ssl/certs/java/cacerts
sudo update-ca-certificates-f
© 2024 OneMinuteCode. All rights reserved.