Forum Discussion
Does Desktop Dev need to run on same machine as Gateway? What am I missing?
- 7 years ago
So here's basically how the gateways work, and why mine didn't work.
You develop in desktop by first connecting to a server, in my case on a different machine, on a different network, but reachable by an IP/port, e.g, 50.60.70.80,9999, database name, and SQL credentials.
When I tried to publish to a web server also hosting a gateway, PBI would give the gateway those credentials (50.60.70.80,9999, DB, and SQL credentials). however, due to the firewall port forwarding, the gateway couldn't connect locally to that SQL database.
BUT, when I used another machine as the gateway (foreign to the SQL server), where that connection string could work, when publishing, PBI sends the credentials to the gateway, gateway says, "sure, I can connect to that", and pop! Worked easily.
(I had also explicitly added those credentials in apps.powerbi.com as part of my debugging to make a new data source on that gateway, so that may be a necessary prerequisite).
I hope this helps somebody in the future.
Well, now I'm complete puzzled. I tried to duplicate my success to another machine, and no luck:
1. Set up firewall port to open port 9933 to SQL on Machine C.
2. Install on-premises (not personal) gateway on machine C, linked to my account, connect to that SQL instance with sa
3. On Machine A, test SSMS connection to Machine C on port 9933, success.
4. Open Power BI Desktop, log in with same account, connect to Machine C on port 9933
5. I can see my tables and data, all is good.
6. Build primitive test dashboard (one panel)
7. Publish.... this is usually where the system "automatically" finds the gateway... can't find gateway. ("publishing successful.. we were unable to find a gateway."
8. Went to Power BI (web interface), Manage Gateways, saw the the gateway didn't have any data sources assigned to it.
9. Set the SQL instance, database name, and sa credentials again. Set the public. Reported that connection was successful.
10. Saved Power BI Desktop as new name, tried to republish.
11. Same error as before.
How the system finds gateways is confusing and still a mystery to me.
So here's basically how the gateways work, and why mine didn't work.
You develop in desktop by first connecting to a server, in my case on a different machine, on a different network, but reachable by an IP/port, e.g, 50.60.70.80,9999, database name, and SQL credentials.
When I tried to publish to a web server also hosting a gateway, PBI would give the gateway those credentials (50.60.70.80,9999, DB, and SQL credentials). however, due to the firewall port forwarding, the gateway couldn't connect locally to that SQL database.
BUT, when I used another machine as the gateway (foreign to the SQL server), where that connection string could work, when publishing, PBI sends the credentials to the gateway, gateway says, "sure, I can connect to that", and pop! Worked easily.
(I had also explicitly added those credentials in apps.powerbi.com as part of my debugging to make a new data source on that gateway, so that may be a necessary prerequisite).
I hope this helps somebody in the future.