microsoft / CSS-Exchange

Exchange Server support tools and scripts
MIT License
1.21k stars 338 forks source link

[Issue] Healthchecker warning about BITS not running #1215

Closed hapklaar closed 1 year ago

hapklaar commented 2 years ago

Our Windows 2016 servers running Exchange 2016 automatically change the startup type for BITS to manual from auto-start (delayed) every 30 minutes and then back again.

- 07:00:35 The Windows Update service entered the running state.
- 07:05:42 The start type of the Background Intelligent Transfer Service service was changed from demand start to auto start.
- 07:05:42 The Background Intelligent Transfer Service service entered the running state.

2 minutes later:

- 07:07:44 The start type of the Background Intelligent Transfer Service service was changed from auto start to demand start.
- 07:07:44 The Background Intelligent Transfer Service service entered the stopped state.
- 07:24:26 The Windows Update service entered the stopped state.

This seems to be driven by Windows Update being started every 30 minutes, 5 minutes prior to the BITS service change and then stopped some 15 minutes after.

This causes the following warning to appear in the HealthChecker output when it is run on an off cycle:

        Common Services Not Running:
                BITS - Status: Stopped - StartType: Manual

I don't know what causes this service behavior, could be SCOM, but it seems to be by design. Should this warning be in HealthChecker?

dpaulson45 commented 1 year ago

Not sure if it should be set to Manual but I do have a lab where it is set that way on 2016 and another that doesn't have it set to manual.

@lusassl-msft should we still display if this service isn't running when set to Manual? This is what I am currently thinking:

hapklaar commented 1 year ago

@dpaulson45 The service continuously changes from automatic to manual. This is probably why you observed different states on different environments. Healthchecker reporting on BITS being on manual seems unnecessary in that context.

lusassl-msft commented 1 year ago

@dpaulson45 what about this for the BITS: Validate that the service is not set to disabled. If it is set to automatic, automatic [delayed] or manual this should be okay and we should not highlight (even if the service is stopped as this can also happen from time to time for some reason).

dpaulson45 commented 1 year ago

@lusassl-msft that is what I have basically coded out. You can check it out in the PR.