Forum Discussion
Azure ATP Sensor Setup - service not starting - missing dependency
Marthin2770 Hey , Make sure that the WmiApSrv.exe file exists in the %WinDir%\system32\wbem folder. If this file is missing, you can try to restore it from your Windows server 2019 installation media.
or try to copy it from your domain controller that already working to the 2 other domain controllers and then you can try to install the sensor again.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily.
elieelkarkafi Hi, thanks for your reply.
The WmiApSrv.exe file exists in the %WinDir%\system32\wbem folder, but the service is missing. I'm unsure if adding it manually with "sc create "wmiAPSrv" binpath= "C:\Windows\System32\wbem\WmiApSrv.exe"" is the right way to do it but I tried.
The Azure Advanced Threat Protection Sensor Updater service is still not starting though:
Service error:
"Windows could not start the Azure Advanced Threat Protection Sensor Updater service on Local Computer. Error 1067: The process terminated unexpectedly."
From log "Microsoft.Tri.Sensor.Deployment.Deployer_20230627101213":
"2023-06-27 10:13:18.1790 Error ServiceControllerExtension ChangeServiceStatus failed to change service status [name=AATPSensorUpdater status=Running Exception=System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.
at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)"
From log on DC1 "Microsoft.Tri.Sensor.Updater-Errors":
"2023-06-27 10:12:26.9427 Error PerformanceCounterMetricManager+<>c System.TypeInitializationException: The type initializer for 'Microsoft.Tri.Infrastructure.PerformanceCounterMetricManager' threw an exception. ---> System.InvalidCastException: Specified cast is not valid."
From log on DC2"Microsoft.Tri.Sensor.Updater-Errors":
2023-06-27 10:33:54.7543 Error PerformanceCounterLib System.InvalidOperationException: Category does not exist.
at CategorySample System.Diagnostics.PerformanceCounterLib.GetCategorySample(string machine, string category)
at string[] System.Diagnostics.PerformanceCounterCategory.GetCounterInstances(string categoryName, string machineName)
at new Microsoft.Tri.Infrastructure.MetricManager(IConfigurationManager configurationManager)
at object lambda_method(Closure, object[])
at object Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at void Microsoft.Tri.Infrastructure.ModuleManager.AddModules(Type[] moduleTypes)
at ModuleManager Microsoft.Tri.Sensor.Updater.SensorUpdaterService.CreateModuleManager()
at async Task Microsoft.Tri.Infrastructure.Service.OnStartAsync()
at void Microsoft.Tri.Infrastructure.TaskExtension.Await(Task task)
at void Microsoft.Tri.Infrastructure.Service.OnStart(string[] args)
- Marthin2770Jun 27, 2023Copper Contributor
Ok, I finally managed to complete the install on DC2.
Did in elevated CMD:
lodctr /r
Then
lodctr /q
and enabled any performance countes that where disabled with
lodctr /e:<provider name>
I will try the same for DC1 and get back with the result- Marthin2770Jun 27, 2023Copper Contributor
Setup still fails on DC1...
From log on DC1 "Microsoft.Tri.Sensor.Updater-Errors":
"2023-06-27 10:12:26.9427 Error PerformanceCounterMetricManager+<>c System.TypeInitializationException: The type initializer for 'Microsoft.Tri.Infrastructure.PerformanceCounterMetricManager' threw an exception. ---> System.InvalidCastException: Specified cast is not valid."
- Jun 27, 2023seems you have some corruption in your system file on your DC did you try to run SFC /scannow ?