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, if the checking script has a PSReadLine/PSConsoleReadLine error - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Mid Server DOWN due to false "expected service name" error, if the checking script has a PSReadLine/PSConsoleReadLine error
KB0861829

Mid Server DOWN due to false "expected service name" error, if the checking script has a PSReadLine/PSConsoleReadLine error


624 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Mid Server DOWN due to false "expected service name" error, if the checking script has a PSReadLine/PSConsoleReadLine error.

The error starts with:
StartupSequencer SEVERE *** ERROR *** The current service named snc_mid_...
Oops, something went wrong. Please report this bug with the details below.
And results in the MID Server going down:
does not match the expected service name snc_mid_.... The current service is being stopped.

This check does correctly get both the service name and wrapper-override.conf name, but the Microsoft error message text is also included in the service name string, and included in the comparison, and shuts the MID Server down unnecessarily.

Unfortunately the known Microsoft bug in PSReadLine module doesn't throw any exception. It just adds the error message to the output.
https://github.com/PowerShell/PSReadLine/issues/1390
PSReadline 2.0.0 does not work on PS 5.1 Windows 2012R2 servers

Steps to Reproduce

  1. Install a MID Server on a windows server host that is subject to the PSReadLine bug. e.g. PowerShell 5.1 on Windows 2012R2 servers, and NET Framework 4.5.2 (the microsoft bug is due to .NET 4.6.1 being expected).
  2. Disable the pre-check (to avoid PRB1437409, which is also normal for on-premise customers).
  3. Upgrade the MID Server

On startup of the new MID Server, or first startup after upgrading of an existing MID Server, the following is seen in the agent log. Note: this is a false error because you can see the service name does exactly match:

StartupSequencer SEVERE *** ERROR *** The current service named snc_mid_iaasn00076692

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 0 Keys:

Exception:
System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.Console.get_CursorLeft()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

does not match the expected service name snc_mid_iaasn00076692. 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.

Although this is not a problem with Servicenow code, checks may be added to avoid this breaking critical functions.

Workarounds to avoid the Microsoft bug are in:
KB0827229 MID Server Startup/Upgrade and Discovery/Orchestration Probes fail due to Microsoft Powershell PSReadLine bug - "Oops, something went wrong" "System.IO.IOException"


Related Problem: PRB1437392

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.