Bug 30141 - Java: Connection error to netbeans portal
Summary: Java: Connection error to netbeans portal
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Java Stack Maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 28070
  Show dependency treegraph
 
Reported: 2022-03-08 20:56 CET by Marc Krämer
Modified: 2022-08-15 12:06 CEST (History)
2 users (show)

See Also:
Source RPM: java-11-openjdk-11.0.13.0.8-2.1.mga8.x86_64
CVE:
Status comment:


Attachments

Description Marc Krämer 2022-03-08 20:56:25 CET
trying to connect to netbeans plugin portal (via netbeans) gives the following error:
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

I assume some setting is not applied to connect to the remote host
Marc Krämer 2022-03-08 20:56:40 CET

Summary: Connection error to netbeans portal => Java: Connection error to netbeans portal

Comment 1 Lewis Smith 2022-03-09 21:15:35 CET
Thank you for the report.

Assigning to Java people with no further questions!

Assignee: bugsquad => java

Comment 2 Frank Griffin 2022-03-09 22:28:49 CET
This is a fairly well-known problem, but it involves a Java setting with which I am not familiar.

https://www.google.com/search?client=firefox-b-1-e&q=%22the+trustAnchors+parameter+must+be+non-empty%22

Depending on which reply you read, it may be that we are providing an empty version of a file that shouldn't be empty, or it may be that it's an OpenJDK bug that has since been fixed.  Or, it may be that the data it wants is part of some other rpm package and we don't list that package as a requirement. It has something to do with encryption certificates, and it shows up in several other distros as well as native installs of OpenJDK.

CC: (none) => ftg

Comment 3 Marc Krämer 2022-03-09 23:03:24 CET
@Frank I think I found the answer:
ls -la /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.1.mga8.x86_64/lib/security/cacerts
lrwxrwxrwx 1 root root 38 Dez  5 17:54 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.1.mga8.x86_64/lib/security/cacerts -> ../../../../../../etc/pki/java/cacerts

 ls -la /etc/pki/java/cacerts
ls: Zugriff auf '/etc/pki/java/cacerts' nicht möglich: Datei oder Verzeichnis nicht gefunden


so, the file is not installed.

After installing
rootcerts-java

all works - but this dependancy should be added, if this is needed for ssl connections, as almost every website uses ssl .
Comment 4 Dave Hodgins 2022-03-10 00:05:50 CET
It's strange. rootcerts-java was not installed on my system, but ...
# urpmq --whatrequires rootcerts-java |sort -u
java-11-openjdk-headless
java-11-openjdk-headless-fastdebug
java-11-openjdk-headless-slowdebug
java-1.8.0-openjdk-headless
java-1.8.0-openjdk-headless-fastdebug
java-1.8.0-openjdk-headless-slowdebug
# rpm -qa|grep openjdk|sort
java-11-openjdk-11.0.13.0.8-2.1.mga8
java-11-openjdk-headless-11.0.13.0.8-2.1.mga8
java-1.8.0-openjdk-1.8.0.312.b07-2.1.mga8
java-1.8.0-openjdk-headless-1.8.0.312.b07-2.1.mga8

So the dependency is there.

Checking my upgrade log, rootcerts-java-20210525.00-1.mga8.noarch.rpm was
installed when I upgraded from Mageia 7 to 8.

I just installed rootcerts-java-20220208.00-1.mga8 and it installed cleanly.

Something caused it to be removed, but I have no idea what. My journal only
goes back about a month.

CC: (none) => davidwhodgins

Comment 5 Dave Hodgins 2022-03-10 00:25:34 CET
Ahh. urpmq is showning that it used to be required.
# rpm -q --requires java-11-openjdk-headless|grep cert
ca-certificates

So it's no longer required.

# tree -ifa /etc/pki|grep java|grep cert
/etc/pki/ca-trust/extracted/java/cacerts
/etc/pki/java/cacerts -> ../../../etc/pki/ca-trust/extracted/java/cacerts

Marc, does netbeans work if the link is changed to poing to
/etc/pki/ca-trust/extracted/java/cacerts
and rootcerts-java removed?
Comment 6 Dave Hodgins 2022-03-10 00:29:39 CET
s /poing/pointing/
Comment 7 Marc Krämer 2022-03-22 19:27:01 CET
Sorry, I've forgotten to answer:
changing the link /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.1.mga8.x86_64/lib/security/cacerts
to point to /etc/pki/ca-trust/extracted/java/cacerts works!
Comment 8 Dave Hodgins 2022-03-23 20:20:55 CET
Please show the output of "rpm -qa --last|grep java" and "journalctl --no-h|grep java".
Comment 9 Marc Krämer 2022-03-24 11:17:25 CET
rpm -qa --last|grep java
lib64javascriptcore-gir4.0-2.34.6-1.mga8.x86_64 Fr 18 Feb 2022 14:16:27 CET
lib64javascriptcoregtk4.0_18-2.34.6-1.mga8.x86_64 Fr 18 Feb 2022 14:16:24 CET
java-11-openjdk-11.0.13.0.8-2.1.mga8.x86_64   Do 09 Dez 2021 14:35:51 CET
java-11-openjdk-headless-11.0.13.0.8-2.1.mga8.x86_64 Do 09 Dez 2021 14:35:40 CET
java-latest-openjdk-16.0.0.0.36-0.rolling.1.mga8.x86_64 Mo 08 Mär 2021 10:33:12 CET
java-latest-openjdk-headless-16.0.0.0.36-0.rolling.1.mga8.x86_64 Mo 08 Mär 2021 10:33:09 CET
timezone-java-2021a-1.mga8.noarch             Sa 06 Feb 2021 15:19:30 CET
javapackages-tools-5.3.0-14.mga8.noarch       Sa 06 Feb 2021 15:18:24 CET
javapackages-filesystem-5.3.0-14.mga8.noarch  Sa 06 Feb 2021 15:18:10 CET

journalctl --no-h|grep java
> no output
Comment 10 Dave Hodgins 2022-03-24 18:04:13 CET
Looks like rootcerts-java has been removed, and aged out of the journal, so
no way now to figure out why it had been installed on that system, yet no one
else has reported a similar problem.

On my system, when rootcerts-java was removed, the symlink /etc/pki/ca-trust/extracted/java/cacerts was updated as part of the installation of the rootcerts
package. I have no idea why this situation arose, or how to further debug it.

I'm going to close this bug as worksforme. Feel free to reopen it if more info
to identify what caused it comes to light, and it's something that can be
fixed now.

Resolution: (none) => WORKSFORME
Status: NEW => RESOLVED

Comment 11 Marc Krämer 2022-03-24 18:17:40 CET
@Dave: I installed rootcerts-java, to solve the problem. But after uninstall the path was not corrected. I had to do it by hand.

Status: RESOLVED => REOPENED
Resolution: WORKSFORME => (none)

Comment 12 Dave Hodgins 2022-03-24 18:44:32 CET
In normal cases, the symlink would have been replaced when the rootcerts update
was installed, that dropped the use of the rootcerts-java package.

Manually reinstalling the rootcerts-java package undoes that change.

The part that isn't clear is what happened in terms of rootcerts and
rootcerts-java packages being installed on that system, that caused the mess.
Comment 13 Dave Hodgins 2022-03-24 18:47:02 CET
Running "urpmi --replacepkgs --replacefiles rootcerts" shows it does update
the symlink.
Comment 14 Marc Krämer 2022-03-24 18:48:02 CET
hmm. I'm not sure. That system was updated (like most of my systems) since mga 4 - so I assume rootcerts-java was once installed. And uninstalled as it was not used anymore.

It is ok for me, to close it. I will open a new bug, if I can reproduce it or it happens again.

Status: REOPENED => RESOLVED
Resolution: (none) => INVALID

Comment 15 Dave Hodgins 2022-03-24 18:54:50 CET
The install I'm currently using started as  Mageia 3, upgraded each release.
Marc Krämer 2022-08-15 12:06:23 CEST

Blocks: (none) => 28070


Note You need to log in before you can comment on or make changes to this bug.