Azure Stack registration query Failed - service problem HciSvc

Trienekens Marc 21 Reputation points
2021-06-15T09:24:20.58+00:00

Hello everybody,

We now have the great new Azure Stack HCI since mid-April, which was supposedly correctly provided and registered in Azure. However, after exactly 30 days it became apparent that no further virtual machines could be provided. It quickly became clear that it was due to the HCI query from Azure, which complained about no connection to the HCI cluster. After further analysis it turned out that the necessary service (HciSvc) had stopped. A manual start was also not possible. The error message from the event log indicated this error message:

Event ID 0
Service cannot be started. System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version = 12.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source. (Exception from HRESULT: 0x80070241)
File name: 'Newtonsoft.Json, Version = 12.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed'
at System.ModuleHandle.ResolveType (RuntimeModule module, Int32 typeToken, IntPtr * typeInstArgs, Int32 typeInstCount, IntPtr * methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal (RuntimeModule module, Int32 typeToken, RuntimeTypeHandle [] typeInstantiationContext, RuntimeTypeHandle [] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType (Int32 metadataToken, Type [] genericTypeArguments, Type [] ...

Yesterday I installed the latest cumulative update (KB5003643) which makes adjustments to the HviSvc.exe and its config. Unfortunately, it didn't fix the bug. The service still cannot be started.

In addition to info:
The Powershell query for the registration status can of course not be carried out, as the named service is required for this.

Setup data:
3 nodes
Fujitsu PRIMERGY RX2540 M5
OS
Microsoft Azure Stack HCI
version
10.0.17784

Azure Stack HCI
Azure Stack HCI
A hyperconverged infrastructure operating system delivered as an Azure service that provides security, performance, and feature updates.
301 questions
0 comments No comments
{count} votes

Accepted answer
  1. Trent Helms - MSFT 2,536 Reputation points Microsoft Employee
    2021-06-15T18:22:29.18+00:00

    Hi @Trienekens Marc ,

    The issue you are facing is a known issue that has been faced in HCI version 20H2. It is caused after installing Microsoft Azure Recovery Services (MARS) or Azure Site Recovery (ASR) agents. When these agents are installed, the Newtonsoft.Json file is updated and the newly referenced file breaks the security signature expected by the HCI service thus preventing the service from starting.

    To fix this issue, please execute the following PS script on each node where this issue has occurred then reboot.

    [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    $publish = New-Object System.EnterpriseServices.Internal.Publish
    $publish.GacInstall("c:\windows\system32\azshci\NewtonSoft.Json.dll")

    After the reboot, all services (including the HCI service) should be in a running state. Note that the HCI service in version 20H2 is a 'Delayed Start' service, so please wait a few moments after the reboot before checking the service.

    This issue has been investigated by our product team and should be resolved with HCI version 21H2.

    Hope this helps!

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Trienekens Marc 21 Reputation points
    2021-06-16T07:14:52.8+00:00

    Hello @Trent Helms - MSFT ,

    Thank you for the quick and qualified answer. It worked. The cluster can synchronize again. I'm looking forward to the update and all the exciting features that will come. Great product.

    Best

    0 comments No comments