Sub topic 14
Troubleshooting common refresh and gateway failures
This chapter assumes you have a published dataset that refreshes through a standard-mode gateway. You should also know how to open refresh history and the gateway data source settings. Troubleshooting is easier when you sort a failure into one of three layers: the Power BI service, the gateway, or the data source.
Start with the refresh history
Open the dataset's refresh history and select a failed row to see its error details. Note the error code, the time, and any activity ID or request ID. Support teams use those IDs, and you can search for them in the gateway logs.
The error text usually tells you which layer failed.
Common failures and fixes
| Symptom | Likely cause | What to check |
|---|---|---|
| Gateway is offline or unreachable | The gateway service is stopped, the machine is off, or outbound traffic is blocked | Check that the gateway service is running. Then test outbound ports. |
| Credentials are invalid | A password expired or changed, or the account lost access | Update the credentials on the gateway data source or the dataset. |
| Dataset cannot be mapped to a data source | The server or database name differs from the gateway data source | Compare both names character by character. |
| Refresh times out | The query or the data volume is too large for the time limit | Filter data at the source. Consider incremental refresh. |
| Refresh is disabled after repeated failures | Power BI paused the schedule after consecutive failures | Fix the cause, then turn the schedule back on. |
Check outbound connectivity
If the gateway looks offline, test from the gateway machine whether it can reach Azure Service Bus. The gateway needs outbound access only, so a blocked port is a common cause.
Test-NetConnection -ComputerName watchdog.servicebus.windows.net -Port 9350If TcpTestSucceeded is False, ask your network team to allow outbound traffic to that host and port. Also check any proxy settings used by the gateway service.
Check name matching
The service maps a dataset to a gateway data source by comparing the server and database names. They must match exactly. In the query below, the gateway data source must use sql01.contoso.local and Sales. A short name such as sql01 or a different case or spelling can break the mapping.
Sql.Database("sql01.contoso.local", "Sales")The line above is the Power Query call, shown only for comparison. You can't run it in PowerShell.
Confirm the failure through the API
You can also read the latest refresh attempts to see the status and times without opening the portal.
Connect-PowerBIServiceAccount
$groupId = '<workspace-id>'
$datasetId = '<dataset-id>'
Invoke-PowerBIRestMethod -Method Get -Url "groups/$groupId/datasets/$datasetId/refreshes?`$top=5"Look for a pattern. A failure at the same time every day points to a competing job or a maintenance window. A failure that began on one date points to a change, such as a password reset or a gateway update.
Check the gateway itself
If the cause isn't clear, open the gateway app on the gateway machine and run its network diagnostics. Export the logs from the same app and search them for the activity ID from the failed refresh. Also check that the gateway version is current, because outdated versions can cause connection problems.
Exercise
A scheduled refresh fails every morning with a message that the data source credentials are invalid. The gateway shows as online. Which layer is the problem in, and what is your first fix?
Show answer
The problem is at the data source credential level, not the gateway connection, because the gateway is online. Re-enter the credentials on the gateway data source (or in the dataset settings), then run a manual refresh to confirm the fix.