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.
sdrevik ,
Does your dataset only contain SQL Server data source? Could you please share the data source settings in your PBIX file? Only when you add all the data sources within gateway, and the connection strings of the data sources are same in gateway and Power BI Desktop, you are able to use gateway to refresh the dataset.
In addition, do you connect to Power BI Service dataset in Power BI Desktop? Do you have appropriate permission on this dataset?
Regards,
Lydia
Lydia, thanks for responding. Yes, a SQL Server is the only kind of data source. When I started developing the dashboard, I connected to the local database, and then when I published it somewhat automatically found the gateway on the same machine I had set up. But if I develop on that machine (call it Machine A) with a copy (Copy A) of the database, I can't find a way to change the connection to an identical schema database (Copy B on Machine B). I went through the steps mentioned above, which would seem the way to do it, but it didn't work.
With respect to the data settings in the PBIX file, the data source settings in Power BI desktop (the 'development' environment) still show the local SQL server. The options just seem to be to set to another local machine- I tried putting in the IP address of a foreign SQL server that had port 1433 exposed (e.g., I can log in with 'sa' via SSMS), and it went to a second page asking for credentials, but when I put in the sa credentials, it said it couldn't log in (even though SSMS worked). Note that machine didn't have a gateway installed, I was just trying to go direct to its SQL server for design just like my local.
At first, it just said it couldn't log in, then when I tried again, it suggested to confirm it's set up for remote connections (it is).
Is there a special way to specify a known gateway when starting with "Get Data" in Dekstop?
Thanks again,
Steve
- sdrevik7 years agoFrequent Visitor
Wait, I think I got it:
1. Get data
2. Enter database server IP and database name
3. Get to 2nd screen, SELECT "DATATBASE" ON LEFT SIDE, then put in sa or database credentials (this is what I missed! It was still on "Windows" on the left side.
4. Accept warning about encryption.
5. Connected! Woot woot!
Now the next step is to install gateway on that server, develop, publish, and see if it finds the gateway. Sounds like I'm on the right path?
But if there's a good way to connect to an existing gateway from desktop for the initial design phase, that would be even better.
- sdrevik7 years agoFrequent Visitor
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.- Anonymous7 years agoNot applicable
sdrevik ,
Do you get "we were unable to find a gateway" warning in Power BI Desktop when publishing PBIX file? If so, please make sure that you are using same server name and database name for the SQL data source in Power BI Desktop and Power BI gateway.
Regards,
Lydia