症状
Exchange Server 2016 从CU5直接升级到CU18后,exchange 日志中频繁出现下列日志:
Log Name: Application Source: MSExchange Autodiscover Date: DateTime Event ID: 1 Task Category: Web Level: Error Keywords: Classic User: N/A Computer: ComputerName Description: Unhandled Exception "Object reference not set to an instance of an object." Stack trace: at Microsoft.Exchange.AutoDiscoverV2.FlightSettingRepository.GetHostNameFromVdir(ADObjectId serverSiteId, String protocol) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.ExecuteOnPremEndFlow(AutoDiscoverV2Request request) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.Execute(AutoDiscoverV2Request request, ITenantRepository tenantRepository) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2HandlerBase.<>c__DisplayClass11_0.<ProcessRequest>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)
解决方法
- 使用使用下列命令检查Autodiscover的URL
Get-AutodiscoverVirtualDirectory -server YourExchangeServerName | fl name, *url*
得知internalURL和ExternalUrl为空,按照步骤2分配Autodiscover URL
- 使用下列命令设置Autodiscover的URL
Get-AutodiscoverVirtualDirectory -Server YourExchangeServerName |set-AutodiscoverVirtualDirectory -ExternalUrl https://autodiscover.FQDN/Autodiscover/Autodiscover.xml //设置外部URL Get-AutodiscoverVirtualDirectory -Server YourExchangeServerName |set-AutodiscoverVirtualDirectory -InternalUrl https://autodiscover.FQDN/Autodiscover/Autodiscover.xml //设置内部URL
总结
按照上述步骤操作完后日志查看器中不在出现相关提示。参考官方链接说明升级到Exchange 2019 CU3或Exchange 2016 CU 14 后会出现此故障,但是小编这次是升级到Exchange 2016 CU18 以后出现的该故障,不确定根本原因是不是和这个有关,小编是按照此文章解决的。具体情况以官方为准