StoreFront upgrade fails if PriviledgedService and MPSFagent (SCOM) is running

StoreFront upgrade fails if PriviledgedService and MPSFagent (SCOM) is running

book

Article ID: CTX220935

calendar_today

Updated On:

Description

If the Citrix SCOM Management Pack Agent service is installed on the StoreFront server, StoreFront cannot upgrade. To work around this issue, disable the SCOM service before attempting the StoreFront upgrade.

Note: This issue is not applicable to StoreFront  3.11 and higher. These services do not need to be stopped if you're on StoreFront 3.11 or higher. 

  1. The StoreFront upgrade fails with the loss of the StoreFront server’s configuration.
    User-added image

  2. Attempting to open the StoreFront management console after the failed upgrade will show an error.
    User-added image

  3. Search for the following error indicating that a StoreFront feature class could not be removed due to file locking by the Citrix SCOM Management Pack Agent service. Open the StoreFront installer and upgrade logs in c:\windows\temp\storefront\CitrixMsi-CitrixStoreFront-x64-<date & time>.log and search for the following error text. 

    Calling custom action Citrix.DeliveryServices.InstallControllerCustomAction!Citrix.DeliveryServices.InstallControllerCustomAction.CustomActions.RemoveInstalledClasses
    Begin RemoveConfiguredFeatures
    UnInstalling feature classes.
    Exception thrown by custom action:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Citrix.DeliveryServices.PowerShell.Command.RunnerInterfaces.Exceptions.PowerShellExecutionException: An error occurred while running a PowerShell command. ---> System.Exception: Exception of type 'Citrix.DeliveryServices.Framework.Utilities.Exceptions.CannotGetExclusiveAccessException' was thrown.
    --- End of inner exception stack trace ---
    at Citrix.DeliveryServices.PowerShell.Command.Runner.PowerShellCommandRunner.InvokeCommand(IPowerShellCommand command, Command powerShellCommand)
    at Citrix.DeliveryServices.PowerShell.Command.Runner.PowerShellCommandRunner.RunCommand(IPowerShellCommand command)
    at Citrix.DeliveryServices.InstallController.ConfigurationController.RemoveInstalledClasses(Boolean runInSeperateDomain)
    at Citrix.DeliveryServices.InstallControllerCustomAction.CustomActions.RemoveInstalledClasses(Session session)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
    at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)

  4. Open a PowerShell session and check for the presence of a basic StoreFront deployment and then any configured Stores.
    Run Get-STFDeployment
    HostbaseUrl             : https://test-sf.example.com/
    SiteId                  : 1
    DeploymentExists        : True
    InstalledFeatureClasses : {ClusterManagement, ConfigurationReplication, PeerResolutionService, SubscriptionsStoreService...}
    FeatureClassInstances   : {}
    Run Get-STFStoreService
    Returns no Stores.

Resolution

  1. Before any StoreFront upgrade, it is recommended that a backup VM snapshot be taken of your existing StoreFront deployment and that you perform a backup of your current StoreFront configuration using the export/import configuration feature (possible on StoreFront 3.5 or higher).
    Citrix Documentation - Export and import the StoreFront configuration.

  2. If StoreFront is also installed on a delivery controller, then performing an upgrade of XenDesktop/XenApp 7.x using its installer may also perform a StoreFront upgrade. 

  3. Check whether your StoreFront server has the Citrix SCOM Management Pack Agent installed if you use SCOM to monitor Citrix components in your deployment.

  4. If you are using a StoreFront server group with multiple servers then the Citrix MPSF Agent service needs to be stopped before upgrading each of the servers in the group.

  5. Stop Citrix Storefront Privileged Administration Service (NT SERVICE\CitrixPrivilegedService) before attempting the Storefront Upgrade.
  6. Check the status of the Citrix MPSF Agent service, and if it is running, stop the service before attempting an upgrade.  The Windows service that needs to be stopped before StoreFront is upgraded is shown below.
    Display Name: Citrix MPSF Agent
    Service Name: ComTradeMPSFAgent
    Description: Citrix SCOM Management Pack Agent for StoreFront
    User-added image

  7. Close any PowerShell or management console sessions you may have open on your existing StoreFront deployment.

  8. Run the StoreFront installer for the version of StoreFront you wish to upgrade to. 

  9. Wait for the upgrade process to complete.

  10. Open the management console and verify your original StoreFront configuration is still present 

  11. Restart the Citrix MPSF Agent service once the StoreFront upgrade procedure is complete to resume monitoring your StoreFront deployment using SCOM.


Problem Cause

A StoreFront feature class cannot be removed during upgrade while the Citrix SCOM Management Pack Agent service is running.

If the Citrix SCOM Management Pack Agent is installed on the StoreFront server and its windows service Citrix MPSF Agent is running when an upgrade is attempted, then in place upgrade will fail.  Failure to disable the service before attempting to upgrade the StoreFront server will result in the loss of all configuration on the StoreFront server.  Shutting down the service before starting the upgrade process is enough to prevent the upgrade failure and loss of StoreFront configuration.

Useful links to details of the Citrix SCOM management packs:

https://www.citrix.com/blogs/2016/03/17/citrix-scom-management-bundle-now-available-for-platinum-customers/
http://docs.citrix.com/en-us/scom-management-packs/storefront/1-9.html
https://docs.citrix.com/en-us/scom-management-packs/xenapp-xendesktop/3-11.html

Issue/Introduction

Cannot perform a StoreFront upgrade if Citrix SCOM Management Pack Agent service is running.