We have seen a few cases some in where we get an error like the following

SNAGHTMLbf4bc85

Failed to register the gateway key.  Before trying to register the gateway key again, confirm that the Data Management Gateway is in a connected state and the Data management Gateway Host Service is started.

This could be the result of a firewall/proxy in your environment that is preventing the traffic from successfully going through.  I’ve be asked what someone has to open up from a firewall perspective to get the Data Management Gateway work. 

An Inside look at Microsoft Data Management Gatewayhttps://support.office.com/en-US/Article/An-Inside-look-at-Microsoft-Data-Management-Gateway-078d306d-2d28-409c-962b-d80b69a1d0b2

The above document outlines what the inbound and outbound traffic will be.  It outlines the following under the Installation section.

Regarding a firewall, the setup program will automatically configure firewall rules for the host machine, with the following TCP ports opened:

  1. Inbound for intranet: 8050/8051 by default while user is able to change with Configuration Manager. These ports are used for OData feeds consumption via the gateway, as well as Data Source Manager to test connection and store credential in the gateway.

  2. Outbound: 80, 443, from 9350 to 9354. These are used by Microsoft Azure Service Bus to establish connection between the cloud services and the gateway.

In case issues, please verify these settings remain correct to ensure a firewall is not the blocker.

Regarding proxy server, please add Microsoft Azure to the whitelist. You can download a list of valid Microsoft Azure IP addresses from the Microsoft Download Center.

 

Adam W. Saxton | Microsoft SQL Server Escalation Serviceshttp://twitter.com/awsaxton