Data Engineer Diary: How to make Power BI Gateway work in an environment with a proxy

With this blog post, I would like to show and describe to you the last lesson that I learned on my recent project regarding the installation and configuration of Power BI Gateway (PBI GW). If you haven’t read my previous blog posts about PBI GW you can do so there: first and second

When I was installing PBI GW in the client’s environment I did the installation in a traditional way. I have downloaded the installation package for Standard GW and run it. The only prerequisite for that installation was that the internal IT team added my account to the privileged users (in PowerPlatform Admin Portal). That was easy and straightforward.

I named the PBI GW that was being installed, saved the recovery key, and then I hit a very weird thing that has never happened to me. When I clicked Configure button, the refresh icon next to it kept rotating for several minutes. After that, it gave me an error message that is displayed in the picture below.

When I clicked on Show Details it stated:

Failed to update gateway details. You may need to change the account the gateway runs under.

This request operation sent to net.tcp://127.0.0.1:45375/powerbi/gatewayconfiguration/service did not receive a reply within the configured timeout (00:01:00).  The time allotted to this operation may have been a portion of a longer timeout.  This may be because the service is still processing the operation or because the service was unable to send a reply message.  Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.”

 Once you click Cancel you see your PBI GW in an offline state.

I was confused. I did not expect that.

But then I realized that client’s network environment used a proxy server. Briefly, a proxy server is a “mediator” through which must the requests flow to communicate with the Internet, otherwise, they won’t be fulfilled. PBI GW was trying to communicate with the Cloud (Azure Service Bus) directly, but it was not able to deliver the request and due to that there were those timeout issues (problematic part is marked as 1. below).

I had to adjust it and tell the PBI GW to use that Proxy server that would mediate the communication between on-prem and Cloud. So, I googled how to do so.

Thankfully there is a great MS docs page that in detail describes what you must do to make it work. Long story short, there are three .NET configuration files that you must adjust depending on your use case.

The first two files:

  • exe.config
  • PowerBI.EnterpriseGateway.exe.config

must be adjusted to make it work. With this configuration, you are changing the connection in a way that is shown on the picture above and marked as number 2. The change that you must do is to add a proxy element into those config files (details and more details).

The third file:

  • Mashup.Container.NetFX45.exe.config

must be adjusted if you want to enable connection with cloud data sources via PBI GW.

In our use case, we modified the first two files. PBI GW then jumped into an Online state, and it worked like a charm. We were able to add the data sources in PBI Service and use that GW seamlessly for the scheduled refreshes.

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *

Prosím, vyplňte toto pole.
Prosím, vyplňte toto pole.
Zadejte prosím platnou e-mailovou adresu.
Chcete-li pokračovat, musíte souhlasit s podmínkami

Menu