Mobile Enterprise Gateway error "The Gateway has not received permission to use the MaaS360 Mobile Enterprise Gateway Relay service"


When logging into the Mobile Enterprise Gateway, users see a message that states "The Gateway has not received permission to use the MaaS360 Mobile Enterprise Gateway Relay service. Mobile users will be unable to access data until this problem is corrected". You have confirmed machines can ping the relay.

These messages are usually the result of a licensing issue or that the provisioning service is unreachable. However, if neither of those is true, then there is a third possibility that could be harder to diagnose.

The alternative could be if one of the files used to persist information across restarts is corrupted in some fashion. This may occur during scheduled server restarts of the gateway process where the Gateway is not provided with enough time to complete the flushing of data to disk.

The recovery of the problem was to stop the gateway process, remove the corrupted metrics file by deleting or renaming stats.dat in the program data directory, start the gateway and it regenerates a fresh stats.dat file and now handles the requests.

It is recommended that on highly loaded servers, you consider giving the Gateway service a longer window to exit the running state so we do not have this corruption happen in the first place. This can be accomplished by following these steps to adjust the period of time the OS will give a service to cleanly shut down.

Increase the Windows “WaitToKillServiceTimeout” setting.

For Windows 7 (all versions) and Windows Server 2008 R2 (all versions)

Increase the time Windows waits to forcefully stop services that have not stopped on their own (default setting is 12000 milliseconds). • Modify the registry value (in milliseconds) for “WaitToKillServiceTimeout” located at “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control”.
For example: To force the server to wait up to 10 minutes for all services to stop, change the value to “600000” (without quotation marks, commas, or decimals).

Reboot the server for the change to take effect.
Note: If the Gateway service does not terminate gracefully before the “WaitToKillServiceTimeout” expires, Windows will forcefully terminate the process and reboot. This condition can cause corruption of the metrics and other persisted info.

Caveat(s): The “WaitToKillServiceTimeout” setting applies to all processes waiting to be terminated. Therefore, a system may take an inordinately long time to shut down because the setting applies to each pending process.

See the WaitToKillServiceTimeout Microsoft TechNet article for more details at

In addition, the “WaitToKillServiceTimeout” value may not work on Windows 7 or Windows Server 2008 R2, as documented in Microsoft Support KB article 2549760 ( A supported hotfix is available from Microsoft to resolve this issue.

BYOD 6.5 through 8.0

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.