Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Mid Server DOWN due to false "expected service name" error, (1) if because of powershell issue the service name cannot be fetched or (2) if the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Mid Server DOWN due to false "expected service name" error, (1) if because of powershell issue the service name cannot be fetched or (2) if the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry
KB0861098

Mid Server DOWN due to false "expected service name" error, (1) if because of powershell issue the service name cannot be fetched or (2) if the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry


2229 Views Last updated : Nov 25, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Mid Server DOWN due to false "expected service name" error in 2 situations:

1.
if the startup check fails with Powershell error for Get-WmiObject, or any other error that results in the service name not being fetched.

StartupSequencer SEVERE *** ERROR *** The current service named 
 does not match the expected service name snc_mid_test_ha1. The current service is being stopped

Any error like this when running the powershell script on startup is not properly handled, which results in the check for duplicate service names still running using invalid input for service names and shutting down the MID Server, even though there is not actually a duplicate service or service name mismatch.

2.
If the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry. This check should not be case sensitive, because the case does not matter, because Windows won't allow the creation of a duplicate with the same name but different case in the first place.

StartupSequencer SEVERE *** ERROR *** The current service named snc_mid_test_HA1
 does not match the expected service name snc_mid_test_ha1. The current service is being stopped

Steps to Reproduce

1.
if the startup check fails with Powershell error for Get-WmiObject, or any other error that results in the service name not being fetched.

  1. On a Windows host that has a problem with WMI or powershell
  2. Either install a new Paris or later MID Server, or upgrade a pre-orlando MID Server to Paris. (it is not clear if this effects Orlando as well as Paris yet)
  3. On startup the following errors will be seen in the agent log, and the MID Server will go down and stay down.
StartupSequencer Running command to determine Powershell version: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noninteractive -nologo -noprofile -command "$v
StartupSequencer     PowerShell version result: full_version:5.1.14409.1018, major_version:5
StartupSequencer     verify Powershell major version 5 against compatible version requirement (v3 - v5)
StartupSequencer PowerShell path is set to "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe", version 5.1.14409.1018
StartupSequencer DEBUG: HTTPClient.registerOtherProtocols() starting on Thread Thread[StartupSequencer,5,main].
StartupSequencer The service name is detected as snc_mid_test_ha1
StartupSequencer WARNING *** WARNING *** Continuing with start up, but Windows file system permissions enforcer encountered an issue: Get-WmiObject : Out of disk space 
WmiObject : Out of disk space 
At E:\MID Servers\TEST\agent\bin\scripts\EnforceFilePermissions.psm1:216 char:16
+ ...  $service = Get-WmiObject "win32_service" -filter "Name='$serviceName ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Followed by this: - Note the empty "current service named" value, showing the code has not checked it actually has a value.

StartupSequencer SEVERE *** ERROR *** The current service named 
 does not match the expected service name snc_mid_test_ha1. The current service is being stopped
Wrapper-Stopper Stopping MID server
MIDServer MID Server stopped

A new install's logs may look like this. "Unable to log the following" is due to the MID Servre record not having been created yet at this point of the first startup.:

StartupSequencer     PowerShell version result: full_version:5.1.14393.3471, major_version:5
StartupSequencer     verify Powershell major version 5 against compatible version requirement (v3 - v5)
StartupSequencer PowerShell path is set to "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe", version 5.1.14393.3471
StartupSequencer DEBUG: HTTPClient.registerOtherProtocols() starting on Thread Thread[StartupSequencer,5,main].
StartupSequencer The service name is detected as snc_mid_psnowmid02
StartupSequencer WARNING *** WARNING *** Continuing with start up, but Windows file system permissions enforcer encountered an issue: Get-WmiObject : Invalid class "win32_service"
At C:\servicenow\ServiceNow MID Server psnowmid02\agent\bin\scripts\EnforceFilePermissions.psm1:216 char:16
+ ...  $service = Get-WmiObject "win32_service" -filter "Name='$serviceName ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
StartupSequencer WARNING *** WARNING *** Unable to log the following MID Issue due to unknown MID sys_id: An unexpected error occurred: Get-WmiObject : Invalid class "win32_service"
At C:\servicenow\ServiceNow MID Server psnowmid02\agent\bin\scripts\EnforceFilePermissions.psm1:216 char:16
+ ...  $service = Get-WmiObject "win32_service" -filter "Name='$serviceName ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

2.
If the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry. This check should not be case sensitive, because the case does not matter, because Windows won't allow the creation of a duplicate with the same name but different case in the first place.

Exactly how several customers have got into this situation is currently unclear.

For the purposes of testing:

  1. Install a MID Server
  2. Edit wrapper-override.conf to change the case of a character in the service name
  3. restart the MID Server

The Agent log will show an error like this, before then going down:

06/30/20 14:32:43 (772) StartupSequencer SEVERE *** ERROR *** The current service named snc_mid_sjnkkst_IT_mid1
does not match the expected service name snc_mid_sjnkkst_it_mid1. The current service is being stopped

Workaround

This problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.

1.
if the startup check fails with Powershell error for Get-WmiObject, or any other error that results in the service name not being fetched.

To resolve the Get-WmiObject error, to avoid this error (other causes may exist):

The Get-WmiObject error may be due to a WMI configuration problem on the host. Please go to the MID Server, open the PowerShell console and issue the command below:

Get-WmiObject "win32_service" -filter "Name='snc_mid_test_ha1'"

If this still fails then you may need to re-register the base classes of WmiObject by running the command below:

mofcomp %windir%\system32\wbem\cimwin32.mof" to re-register the base classes of WmiObject 

2.
If the 'case' of the Service Name not exactly matching between wrapper-override.conf and the running service/registry. This check should not be case sensitive, because the case does not matter, because Windows won't allow the creation of a duplicate with the same name but different case in the first place.

To resolve this:-

  1. edit the agent\conf\wrapper-override.conf file
  2. Change the case of the wrapper.name value to match the actual "current service named <this name>" name from the error message
  3. Save
  4. Restart MID Server

Related Problem: PRB1435863

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.