In this post we will see how to fix ConfigMgr CMG Error – The remote name could not be resolved. If you have setup SCCM CMG for the first time and noticing the same error, this post is for you.
However sometimes you forget a simple step and later you realize that you missed that step. So my SCCM CMG setup went well but I got errors when I ran Cloud Management Gateway connection analyzer.
To set up a cloud management gateway in your SCCM environment you can use the guide – https://www.prajwaldesai.com/setup-sccm-cloud-management-gateway/.
And for CMG troubleshooting, you can use refer my post on CMG log files.
Running the SCCM CMG connection analyzer showed the following errors.
- Check the CMG Service is in ready state – OK
- Connect to the CMG Service to see if it’s running – Error
- Check configuration settings of the CMG service – Error
- Check connection status of CMG connection points – Warning
- Testing the CMG Channel for management point – Error
- Check CMG enabled site system roles – OK
If you read the CMG error description, it says Failed to connect to the CMG Service. Unexpected response status code is NameResolutionFailure. For more information, see SMSAdminUI.log.
Checking the SMSAdminUI.log shows the error :-
System.Net.WebException\r\nThe remote name could not be resolved: 'prajwalcmg.prajwal.org'\r\n at System.Net.HttpWebRequest.GetResponse() at Microsoft.ConfigurationManagement.AdminConsole.AzureServices.CMGAnalyzer.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)\r\n [1, PID:3916]:System.Management.ManagementException\r\nNot found \r\n at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
Fix ConfigMgr CMG Error – The remote name could not be resolved
So as per the log file the CMG error is “The remote name could not be resolved: ‘prajwalcmg.prajwal.org”. To fix this issue, you must configure CNAME on internal DNS.
Login to DNS server. Expand the domain and right click on right pane and click New Alias (CNAME).
Enter the Alias name as your CMG service name and enter the FQDN which will be your cmgname.cloudapp.net. Click OK.
Most of all when you ping your CMG.cloudapp.net, you may get the IP address but the ping responses are blocked. In addition, you can open command prompt and do a nslookup.
Note – If you can’t resolve the cloudapp.net address then IMO the service did not get created.
Now open the Cloud management gateway (CMG) connection analyzer and click Start. You may need to sign-in again. Check the analyzer results, the remote name could not be resolved error is now fixed.