BizTalk Server Administration Console cannot connect to WMI provider. Ensure that the WMI service is running. (Microsoft.BizTalk.SnapIn.Framework)

BizTalk Server Administration Console cannot connect to WMI provider. Ensure that the WMI service is running. (Microsoft.BizTalk.SnapIn.Framework)

BizTalk Server Administration Console cannot connect to WMI provider? The things I found from playing around with all kind of different environments from different clients and my personal ones (Hehe)… and I thought that I had already found all type of real or imaginary BizTalk errors, but once again I BizTalk Server prove me that I was wrong, this issue was new for me – who says that my BizTalk Consultant life is boring? (hehe).

Joking apart, I got the following error while trying to navigate in the BizTalk Server Administration Console in one of my personal environments:

TITLE: BizTalk Server Administration
——————————
Failed to load Group [BTS2016LAB01:BizTalkMgmtDb] data providers. (Microsoft.BizTalk.Administration.SnapIn)

For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2016&ProdVer=3.12.774.0&EvtSrc=Microsoft.BizTalk.Administration.SnapIn.Properties.Errors&EvtID=FailedLoadingGroupProviders&EvtChain=Microsoft.BizTalk.Administration.SnapIn.Properties.Errors+%2cFailedLoadingGroupProviders%3bMicrosoft.BizTalk.SnapIn.Framework.Properties.ErrorMessages+%2cConnectToWMIProviderFailed
——————————
ADDITIONAL INFORMATION:
Failed to load Group [BTS2016LAB01:BizTalkMgmtDb] data providers. (Microsoft.BizTalk.Administration.SnapIn)

For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2016&ProdVer=3.12.774.0&EvtSrc=Microsoft.BizTalk.Administration.SnapIn.Properties.Errors&EvtID=FailedLoadingGroupProviders&EvtChain=Microsoft.BizTalk.SnapIn.Framework.Properties.ErrorMessages+%2cConnectToWMIProviderFailed
——————————
Cannot connect to WMI provider. Ensure that the WMI service is running. (Microsoft.BizTalk.SnapIn.Framework)

For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2016&ProdVer=3.12.774.0&EvtSrc=Microsoft.BizTalk.SnapIn.Framework.Properties.ErrorMessages&EvtID=ConnectToWMIProviderFailed
——————————
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (Exception from HRESULT: 0x80070422) (System.Management)
——————————
BUTTONS:
OK
—————————–

BizTalk Server Administration Console cannot connect to WMI provider

Cause

The reason for the BizTalk Server Administration Console cannot connect to WMI provider is because the BTS Administration Console relies on Windows Management Instrumentation (WMI) service, more specifically, the BizTalk WMI Provider (BTSWMIProvider.dll) to perform all type of different queries into BizTalk Environment (or BizTalk databases)

And for that reason, Windows Management Instrumentation (Winmgmt) service need to be enabled and running on the server in which you are running the BizTalk Server Administration Console.

In my case, the problem was that while I was investigating the unnecessary services that I could disable to optimize BizTalk Server performance, I disable this important service.

Solution

As I mentioned above, the solution to this problem is to Enable and Start the Winmgmt service, you can accomplish that by:

  • If the service is Disabled:
    • Press the “Windows key” to open the Start menu, type “Services” and click on “View local services” option from the Search window.
    • In the Services window, on the Services (Local) panel select the Windows Management Instrumentation service, right click and select “Properties” option.
      • On the Windows Management Instrumentation Properties (Local Computer) window:
      • On the General tab apply the following configuration.
      • Startup type: “Automatic”
      • And then click “Start” and “Apply”.

BizTalk Server Administration Console cannot connect to WMI provider: Winmgmt service

  • If the service is Enable, you can simply:
    • Open a command prompt as administrator by pressing the “Windows key” to open the Start menu and type “cmd” in the Start Search box, right-click in “Command Prompt” and select from the context menu the “Run as administrator” option
    • And type the following command: net stat winmgmt

BizTalk Server Administration Console cannot connect to WMI provider: Winmgmt service running

Once the Winmgmt service is running you will be able to use the BizTalk Server Administration Console without this error/problem happening.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

BizTalk Assessment: .NET Runtime Optimization Service causing high CPU usage

BizTalk Assessment: .NET Runtime Optimization Service causing high CPU usage

It is very important to optimize everything possible for BizTalk archive the best performance it can, especially if you are dealing with BizTalk Server DEV environments on Azure using Azure Virtual Machines. Again, as I explain in a previous post (here), we normally tend to be careful in choosing the VM Disk type and VM sizes mostly because of the price, so tuning the machine is very important, otherwise sometimes they tend to be a little slow and even the most insignificant things (that we think they are) can have a huge impact on BizTalk Server performance. One of the cases that I found these days was the .NET Runtime Optimization Service causing high CPU usage…

NET Runtime Optimization Service causing high CPU usage

… Indeed, and we don’t need to give explanations to explain that everything that may affects the CPU to cause a High Load (or usage) inherently affects and cause huge impact on BizTalk Server performance.

The .NET framework is regularly optimized by Microsoft using the .NET Runtime Optimization Service to make sure you get the best out of the system libraries and this is also done for your installed managed application. It is also more or less responsible for precompiling .NET assemblies in the background. Once it’s done, it will go away. And while you may see CPU usage almost near the 100%, the compilation happens in a process with low priority, so it tries not to steal the CPU for other processes you are doing. Once everything is compiled, assemblies will now be able to share pages across different processes and warm startup will be typically much faster.

Again, once the .NET Runtime Optimization Service once the service finishes his process it will go away, but in my case this process was already running several hours, so instead of waiting until for the computer to idle, we can force it to compile everything now! Solving this “issue” in a fast way (couple of minutes). For that you should:

  • Open a command prompt as administrator and run the adsutil command. To do this, Press the “Windows key” to open the Start menu and type “cmd” on the Start Search box, right-click in “Command Prompt” and select from the context menu the “Run as administrator” option.
  • And change to the following folder: “C:WindowsMicrosoft.NETFrameworkv4.0.30319” or “c:WindowsMicrosoft.NETFramework64v4.0.30319” (on a 64-bit operating system)
  • Type “ngen.exe executequeueditems”, and press ENTER
  • Wait until the operation is finished, I think you may receive the following message at the command prompt: “All compilation targets are up to date.”

This will process all pending work. Once this is done, the service will shutdown, as it has nothing else to do and you will see that the CPU will be back to the normality.

NET Runtime Optimization Service causing high CPU usage fixed

This can be important to be aware for the Administration team (or DevOps team) while planning your .NET framework update to make sure that everything run smoothly especially in the production environment, otherwise this can be one of the reasons (at least for a few minutes or hours) for you notice that our production applications are running a little slowly.

There is also a PowerShell provide by the Microsoft .NET team to speed up the optimization service: DrainNGenQueue.ps (see more here)

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.