Forum Discussion
how to solve javax.net.ssl.SSLHandshakeException when I called power bi api
Hi simbasister ,
This seems to be a SSL issue, you can refer to the links below to make troubleshooting to try to solve it.
Java Exception Handling – SSLHandshakeException
1. Generate a new key and storing it in a local
keystorefile:$ keytool -genkeypair -alias airbrake -keyalg RSA -validity 7 -keystore keystore2. Export the keystore to a local file:
$ keytool -export -alias airbrake -keystore keystore -rfc -file airbrake.cer3. Import the certificate into the
truststore. The best way to think of the difference between akeystoreandtruststoreis that thekeystoreis used forprivate keys, while thetruststoreis for public certificates.$ keytool -import -alias airbrake -file airbrake.cer -keystore truststore4. Add the following to the
SSLServerclass:// SSLServer.java System.setProperty("javax.net.ssl.keyStore", "keystore"); System.setProperty("javax.net.ssl.keyStorePassword", "password");5. Add the following to the
SSLClientclass:// SSLClient.java System.setProperty("javax.net.ssl.trustStore", "truststore"); System.setProperty("javax.net.ssl.trustStorePassword", "password");
How to solve javax.net.ssl.SSLHandshakeException Error?
Troubleshooting SSL related issues (Server Certificate)
Best Regards
It seems that I need obtain the public certificate from power bi server. Is that right? I tried many ways to dowload and save a copy. Unfortunatelly, there may be something wrong in obtaining one. If so, could you tell me how and where can I get the public certificate from power bi server? Then I can use keytool to install it. Thank you.