Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch metadata #248

Open
vaniOK20 opened this issue May 25, 2024 · 2 comments
Open

Failed to fetch metadata #248

vaniOK20 opened this issue May 25, 2024 · 2 comments

Comments

@vaniOK20
Copy link

[authlib-injector] [INFO] Logging file: C:\Users\User\Desktop\authlib-injector.log
[authlib-injector] [INFO] Version: 1.2.5
[authlib-injector] [INFO] Authentication server: https://ely.by
[authlib-injector] [ERROR] Failed to fetch metadata: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

@rocvaredgs
Copy link

same problem

@GamerVII-NET
Copy link

This error occurs because Java does not trust the SSL certificate of the server from which the client is trying to fetch metadata. It typically happens when the server's certificate is not in Java's TrustStore.

Reply to the user:

The error occurs because Java does not trust the server's SSL certificate. To resolve this issue, follow these steps:

1. Ensure the server's certificate is valid.
2. If the certificate is self-signed or issued by an untrusted Certificate Authority (CA), download the certificate and add it to Java's TrustStore (cacerts).

Command to add the certificate:

keytool -import -trustcacerts -file .crt -keystore <path_to_cacerts> -alias <alias_name>

By default, `cacerts` is located in the Java directory: `<java_home>/lib/security/cacerts`.

3. Make sure you're using the correct Java version to run the application.
4. If the issue persists, check the configuration of the authlib-injector client.

The default password for `cacerts` is `changeit`. After adding the certificate, restart the application.

If you are setting up the server, make sure the SSL certificate is properly installed and is issued by a trusted Certificate Authority (CA).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants