11

I don't speak English, sorry. I have this message to my DBeaver Can you help me to fix the problem ?

Network error

Motif:

Network unavailable:

javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Robbe
  • 2,610
  • 1
  • 20
  • 31
Loïc YOLA
  • 111
  • 1
  • 1
  • 3
  • 1
    Does this answer your question? [Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?](https://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore) – Shayan Shafiq Mar 23 '22 at 12:18

6 Answers6

13

I have similar error the first time that i open a DB:

Network error

Reason: Network unavailable due to certificate issue. Try changing the setting Use Windows trust store in Preferences->Connections and restart DBeaver. It might help if you haven't overridden trust store. javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I try 'bAsK' solution but not work for me.

The solution for me is remove check in the setting Use Windows trust store in Preferences->Connections and restart DBeaver

enter image description here

I also installed JRE 8 (Java)

Ricko..
  • 619
  • 6
  • 18
10

There are two ways to solve your problem.

1 - Check this link: ( https://dbeaver.com/docs/wiki/Importing-CA-Certificates-into-DBeaver/22.2/ ) and follow the steps.

2 - In DBeaver installation path, open the dbeaver.ini file and remove this line: -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT

AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35
bAsK
  • 109
  • 4
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31733413) – Kuro Neko May 14 '22 at 08:03
  • And indeed, the link is no longer valid. – Robert Altman Jun 01 '23 at 14:55
  • 1
    @RobertAltman I've added a [new answer](https://stackoverflow.com/a/76389734/4549619) with the steps from the link. – Chanandler Bong Jun 02 '23 at 11:32
6

For macOS:

Edit:

/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini

add the line:

-Djavax.net.ssl.trustStoreType=KeychainStore

Restart the DBeaver application to resolve this problem.

benc
  • 1,381
  • 5
  • 31
  • 39
Jeeva
  • 61
  • 1
  • 5
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 23 '23 at 23:16
  • I believe this comment is from the GitHub issue here: https://github.com/dbeaver/dbeaver/issues/4341 For what it's worth, this fix did not work for me on MacOS – Morrious Jun 16 '23 at 21:42
1

I resolved this using below option enabled.

enter image description here

Bhanu
  • 64
  • 1
  • 2
0

I did the same step, and did not work, but then I changed the SSL Factory to org.postgresql.ssl.LibPQFactory and it works.

0

If you are using custom cacerts in your Java installation you need to replace the cacerts file in DBeaver's jre folder. The jre folder is located in the main installation folder of DBeaver.

Note that if someone installed your Java for you (e.g. on a company machine) you might be not aware that Java cacerts where updated, so this solution might be also worth trying. In such case copy the cacerts file from /lib/security folder of your Java installation into jre folder of DBeaver (see also How do I find out what keystore my JVM is using).

Chanandler Bong
  • 403
  • 1
  • 11
  • 23