Sub topic 13
Keeping a gateway healthy: updates, recovery key, and logs
This chapter assumes you have installed a standard-mode gateway, mapped a dataset to it, and read refresh history. It covers three routine tasks: updating, protecting the recovery key, and collecting logs.
Updating the gateway
The gateway does not update itself. You download the current installer from Microsoft and run it on the gateway machine. It upgrades the existing installation in place and keeps your registration and data sources.
Microsoft releases a new version every month and supports only recent releases. An old gateway can fail in ways that updates would have fixed, and support will ask you to update first. In a cluster, update every member to the same version. Do them one at a time, so another member keeps serving refreshes while one is offline.
The recovery key
When you register a gateway, you enter a recovery key. The gateway uses it to encrypt the credentials it stores. The key is not stored anywhere that can show it to you later.
You need the key to:
- Restore a gateway on a new machine.
- Migrate a gateway to new hardware.
- Take over an existing gateway.
- Add a new member to an existing cluster.
Checking the service
The gateway runs as a Windows service named PBIEgwService. Run this on the gateway machine to see whether it is running:
Get-Service -Name PBIEgwService | Select-Object Name, Status, StartTypeA status of Stopped explains why the Power BI service reports the gateway as offline. Start it with Start-Service PBIEgwService.
Working with logs
Open the on-premises data gateway app and use the Diagnostics tab. It offers three things:
- Network ports test. Checks outbound connectivity to the Azure Service Bus endpoints.
- Additional logging. Records more detail. Turn it on while you reproduce a problem, then turn it off, because the log files grow quickly.
- Export logs. Packages the logs into a ZIP file you can read yourself or send to support.
Logs live under the service account's profile, by default PBIEgwService. The gateway writes several files, such as service logs, configuration logs, and logs for data-source access. When a refresh fails with a vague error, find the timestamp in refresh history, then look for the same time in the exported logs.
Common mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Never updating | Unsupported version, fixed bugs remain | Update monthly |
| Recovery key lost | Gateway cannot be restored or migrated | Store the key in a vault at install time |
| Additional logging left on | Disk fills with log files | Turn it off after troubleshooting |
| Updating all cluster members at once | No member available during refreshes | Update one at a time |
Exercise
A gateway machine fails and you must move the gateway to new hardware. Which item do you need that cannot be retrieved from the old installation, and what happens if you do not have it?
Show answer
You need the recovery key. Without it you cannot restore or migrate the gateway. You must install a new gateway, re-create all data sources and credentials, and remap each dataset to it.
Exercise
A refresh failed at 07:02 with a generic error. Which gateway tools help, and what should you do about additional logging afterward?
Show answer
Use the Diagnostics tab to turn on additional logging, reproduce the failure, then export the logs and look at the entries around 07:02. Turn additional logging off afterward so log files do not grow without limit.