<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to fix SSL Exception Issue while embedding power bi contents in a react and java spring applicat in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3968964#M53046</link>
    <description>&lt;P&gt;After several possible analysis, we found that the issue was from the Application Deployment side. There was some issue in the Docker image creation process, which was restricting the power bi api that we have used to fetch the access token.&lt;/P&gt;&lt;P&gt;And how we arrived at this is when we copied the api code which fetches the access token to another application which is already deployed and running fine. By doing this experiment, we were able to fetch the access token without SSL Exception error. Once we got the access token we then fetched the Embed URL and passed it to frontend and it worked. We can now see the reports.&lt;BR /&gt;Redeployed the application and it's working fine now.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2024 13:44:57 GMT</pubDate>
    <dc:creator>INC_Saurabh</dc:creator>
    <dc:date>2024-06-03T13:44:57Z</dc:date>
    <item>
      <title>How to fix SSL Exception Issue while embedding power bi contents in a react and java spring applicat</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3830940#M51711</link>
      <description>&lt;P&gt;We have Embedded Power bi Report inside a React &amp;amp; Java Spring boot based application using App Owns Data via Service Principal method. The application is hosted in Azure Kubernetes Service with a mapped subdomain cherrywork.com.&lt;/P&gt;&lt;P&gt;We can access the application using this URL, but the power bi contents embedded within this application is not visible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While looking at the issue, we got this error message : message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;"com.microsoft.aad.msal4j.MsalClientException: javax.net.ssl.SSLException: Connection reset"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no firewall restriction from my organization.&lt;/P&gt;&lt;P&gt;Using the Azure library in Java to try to obtain an access token with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;ConfidentialClientApplication app = ConfidentialClientApplication.builder(             Constants.clientId,             ClientCredentialFactory.createFromSecret(Constants.appSecret))       .authority(Constants.authorityUrl + Constants.tenantId)       .build();
 
ClientCredentialParameters clientCreds = ClientCredentialParameters.builder(             Collections.singleton(Constants.scopeBase))       .build();
 
// Acquire new AAD token IAuthenticationResult result = app.acquireToken(clientCreds).get(); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I run the application on my local machine, it works fine. But once my organization deploys it to Azure Kubernetes Service, we get the following error :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;2024-03-27 05:05:46.130 ERROR 1 --- [       Thread-2] c.m.a.m.ConfidentialClientApplication    : [Correlation ID: 26588393-a78f-4fe8-b8a3-b3350bead014] Execution of class com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier failed.
com.microsoft.aad.msal4j.MsalClientException: javax.net.ssl.SSLException: Connection reset
    at com.microsoft.aad.msal4j.HttpHelper.executeHttpRequest(HttpHelper.java:68) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AadInstanceDiscoveryProvider.sendInstanceDiscoveryRequest(AadInstanceDiscoveryProvider.java:119) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AadInstanceDiscoveryProvider.doInstanceDiscoveryAndCache(AadInstanceDiscoveryProvider.java:135) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AadInstanceDiscoveryProvider.getMetadataEntry(AadInstanceDiscoveryProvider.java:42) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.getAuthorityWithPrefNetworkHost(AuthenticationResultSupplier.java:32) [msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier.execute(AcquireTokenByAuthorizationGrantSupplier.java:59) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:59) [msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:17) [msal4j-1.7.1.jar!/:1.7.1]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) [na:1.8.0_382]
    at java.lang.Thread.run(Thread.java:750) [na:1.8.0_382]
Caused by: javax.net.ssl.SSLException: Connection reset
    at sun.security.ssl.Alert.createSSLException(Alert.java:127) ~[na:1.8.0_382]
    at sun.security.ssl.TransportContext.fatal(TransportContext.java:331) ~[na:1.8.0_382]
    at sun.security.ssl.TransportContext.fatal(TransportContext.java:274) ~[na:1.8.0_382]
    at sun.security.ssl.TransportContext.fatal(TransportContext.java:269) ~[na:1.8.0_382]
    at sun.security.ssl.SSLTransport.decode(SSLTransport.java:138) ~[na:1.8.0_382]
    at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1401) ~[na:1.8.0_382]
    at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1309) ~[na:1.8.0_382]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440) ~[na:1.8.0_382]
    at sun.net.
www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
~[na:1.8.0_382]
    at sun.net.
www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:197)
~[na:1.8.0_382]
    at sun.net.
www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1572)
~[na:1.8.0_382]
    at sun.net.
www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1500)
~[na:1.8.0_382]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[na:1.8.0_382]
    at sun.net.
www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:352)
~[na:1.8.0_382]
    at com.microsoft.aad.msal4j.DefaultHttpClient.readResponseFromConnection(DefaultHttpClient.java:107) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.DefaultHttpClient.executeHttpGet(DefaultHttpClient.java:47) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.DefaultHttpClient.send(DefaultHttpClient.java:35) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.HttpHelper.executeHttpRequestWithRetries(HttpHelper.java:86) ~[msal4j-1.7.1.jar!/:1.7.1]
    at com.microsoft.aad.msal4j.HttpHelper.executeHttpRequest(HttpHelper.java:64) ~[msal4j-1.7.1.jar!/:1.7.1]
    ... 9 common frames omitted
    Suppressed: java.net.SocketException: Broken pipe (Write failed)
        at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.8.0_382]
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[na:1.8.0_382]
        at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[na:1.8.0_382]
        at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81) ~[na:1.8.0_382]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:362) ~[na:1.8.0_382]
        ... 26 common frames omitted
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[na:1.8.0_382]
    at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_382]
    at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:464) ~[na:1.8.0_382]
    at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:165) ~[na:1.8.0_382]
    at sun.security.ssl.SSLTransport.decode(SSLTransport.java:109) ~[na:1.8.0_382]
    ... 23 common frames omitted&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help to resolve this issue asap. Please mention the steps that we should follow to resolve this issue.&lt;/P&gt;&lt;P&gt;We checked all the permissions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;app registration in Azure AD&lt;/LI&gt;&lt;LI&gt;Api permission for the App to Power BI Service&lt;/LI&gt;&lt;LI&gt;Client Secret&lt;/LI&gt;&lt;LI&gt;security group&lt;/LI&gt;&lt;LI&gt;Power BI Admin Portal -&amp;gt; Allowed to embed content in app &amp;amp; Service Principal to use Power BI Apis ( added security group)&lt;/LI&gt;&lt;LI&gt;power bi workspace access to Registered Application&lt;/LI&gt;&lt;LI&gt;Used Embedded URL, Embedded Token, Report ID to fetch the report&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Apr 2024 12:57:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3830940#M51711</guid>
      <dc:creator>INC_Saurabh</dc:creator>
      <dc:date>2024-04-11T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix SSL Exception Issue while embedding power bi contents in a react and java spring applicat</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3837325#M51744</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="722647" data-lia-user-login="INC_Saurabh" class="lia-mention lia-mention-user"&gt;INC_Saurabh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may be differences in the trust store configuration.&lt;/P&gt;
&lt;P&gt;You can check that the SSL certificates of the services with which your application communicates are correctly installed in the environment's trust store.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html" target="_blank"&gt;keytool (oracle.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This is the related document, you can view this content:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/5507878/ssl-connection-reset" target="_blank"&gt;java - SSL Connection Reset - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/71023310/javax-net-ssl-sslexception-connection-reset-on-few-request-out-of-the-total" target="_blank"&gt;java - javax.net.ssl.SSLException: Connection reset on few request out of the total - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/68926228/ssl-exception-connection-reset" target="_blank"&gt;java - SSL Exception: Connection reset - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 07:26:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3837325#M51744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-15T07:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix SSL Exception Issue while embedding power bi contents in a react and java spring applicat</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3968964#M53046</link>
      <description>&lt;P&gt;After several possible analysis, we found that the issue was from the Application Deployment side. There was some issue in the Docker image creation process, which was restricting the power bi api that we have used to fetch the access token.&lt;/P&gt;&lt;P&gt;And how we arrived at this is when we copied the api code which fetches the access token to another application which is already deployed and running fine. By doing this experiment, we were able to fetch the access token without SSL Exception error. Once we got the access token we then fetched the Embed URL and passed it to frontend and it worked. We can now see the reports.&lt;BR /&gt;Redeployed the application and it's working fine now.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 13:44:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-fix-SSL-Exception-Issue-while-embedding-power-bi-contents/m-p/3968964#M53046</guid>
      <dc:creator>INC_Saurabh</dc:creator>
      <dc:date>2024-06-03T13:44:57Z</dc:date>
    </item>
  </channel>
</rss>

