Forum Discussion

cbrnit's avatar
cbrnit
Copper Contributor
Jan 28, 2026

Azure Migrate Physical Server Discovery - ServerDiscoveryService.exe Crash Bug

Summary

The Azure Migrate appliance for physical server discovery fails to complete discovery due to a crash bug in ServerDiscoveryService.exe. The service successfully connects to target servers but crashes during WSMan transport cleanup before any discovery data is collected.

Environment

  • Appliance OS: Windows Server 2022 Standard Evaluation (Build 20348)
  • Appliance Type: Physical server discovery (script-based installation)
  • ServerDiscoveryService.exe Version: 2.0.3300.663
  • .NET Version: 8.0.22 (CoreCLR 8.0.2225.52707)
  • Target Servers: Windows Server (various) and Linux, all on-premises
  • Discovery Agent Version: 2.0.03300.663
  • Appliance Configuration Manager Version: 6.1.294.1847

Symptoms

  1. Target server validation succeeds in the appliance configuration manager
  2. CIM sessions connect successfully (logs show "TestConnection succeeded for CIM Session with HTTP protocol")
  3. Connections are immediately disposed with "Disposing all connections when the process is shutdown"
  4. No discovery data is collected
  5. Azure portal shows error 60001 with misleading "Could not load file or assembly 'Microsoft.Management.Infrastructure'" message
  6. Discovery status remains "Discovery Incomplete" for all Windows servers

Root Cause

The ServerDiscoveryService.exe process crashes repeatedly with an unhandled NullReferenceException in the WSMan transport finalizer. This is visible in the Windows Application Event Log:

Application: ServerDiscoveryService.exe CoreCLR Version: 8.0.2225.52707 .NET Version: 8.0.22 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException: Object reference not set to an instance of an object. at System.Management.Automation.Remoting.Client.BaseClientTransportManager.CloseAsync() at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync() at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize()

The crash also triggers an access violation:

Faulting application name: ServerDiscoveryService.exe, version: 2.0.3300.663 Exception code: 0xc0000005 Faulting application path: C:\Program Files\Microsoft Azure Server Discovery Service\ServerDiscoveryService.exe

These crashes occur approximately every 10 minutes.

Troubleshooting Completed

  1. Verified manual connectivity works: PowerShell Invoke-Command and New-CimSession both succeed from the appliance to target servers using the same credentials
  2. Verified WinRM configuration: Targets have WinRM HTTP listener on port 5985, LocalAccountTokenFilterPolicy is set to 1
  3. Verified assemblies exist: Microsoft.Management.Infrastructure.dll is present in the GAC on both the appliance and target servers
  4. Tested both FQDNs and IP addresses: Same failure occurs with both
  5. Tested both local and domain credentials: Same failure with properly formatted credentials (domain\user)
  6. Verified time synchronization: Appliance clock is accurate
  7. Verified appliance is up to date: All components show current versions
  8. Tested with fresh appliance: Previously tried OVA-based appliance with similar results; rebuilt using Microsoft's PowerShell script installer on clean Server 2022—same issue

Relevant Log Locations

  • C:\ProgramData\Microsoft Azure\Logs\ConfigManager\ClientOperations_*.log - Shows successful CIM connections followed by immediate disposal
  • C:\ProgramData\Microsoft Azure\Logs\ConfigManager\ApplianceOnboarding-Portal-*.log - Shows error 60000 "UnhandledException" with message "Internal error occured." (note: typo is in original)
  • Windows Event Log (Application) - Contains the actual crash stack traces

Conclusion

This is a code defect in ServerDiscoveryService.exe—a null reference exception in a finalizer is a programming error that cannot be caused by configuration or environmental factors. The service connects successfully but crashes before completing its work.

Request

Please escalate to the Azure Migrate engineering team for a bug fix in ServerDiscoveryService.exe version 2.0.3300.663.

No RepliesBe the first to reply

Resources