locked
SCOM - DPM Management Pack - Discovery Errors RRS feed

  • Question

  • Hi All!

    After we imported the new DPM Management pack, we received a bunch of "Power Shell Run space Failed to start" alerts from some agents. 

    The following log was written in Operations Manager Eventlog:

    Failed to run the PowerShell script due to exception below, this workflow will be unloaded.

    System.ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at System.Management.Automation.ExecutionContext.LoadAssembly(String name, String filename, Exception& error)
       at System.Management.Automation.ExecutionContext.AddAssembly(String name, String filename, Exception& error)
       at System.Management.Automation.Runspaces.InitialSessionState.Bind(ExecutionContext context, Boolean updateOnly, PSModuleInfo module, Boolean noClobber, Boolean local)
       at System.Management.Automation.AutomationEngine..ctor(PSHost hostInterface, RunspaceConfiguration runspaceConfiguration, InitialSessionState iss)
       at System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()
       at System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall)
       at Microsoft.EnterpriseManagement.Common.PowerShell.RunspaceController.RunScript[T](String scriptName, String scriptBody, Dictionary`2 parameters, Object[] constructorArgs, IScriptDebug iScriptDebug, Boolean bSerializeOutput)
       at Microsoft.EnterpriseManagement.Modules.PowerShell.PowerShellProbeActionModule.RunScript(RunspaceController runspaceController) 

    Script Name: LibraryAndDriveDiscovery.ps1 

    One or more workflows were affected by this.  

    Workflow name: Microsoft.SystemCenter.DataProtectionManager.2011.Discovery.LibraryAndDriveDiscovery 
    Instance name: *Servername*
    Instance ID: {00000000-0000-0000-0000-000000000000}

    Management group: *ManagementGroup*

    The Agent runs with Local System account, Tried to run manually with my local admin account and it was successful.
    I crosschecked on some server and I couldn't find any difference between PS version, Security Settings. 

    SCOM Version: 2019
    Agent OS: 2008R2

    Did somebody met with this issue? 

    Best Regards,

    Gergő

    Thursday, January 9, 2020 1:59 PM

Answers

  • Hi,

    SCOM 2019 doesn't support Windows Server 2008 R2, which may also be the reason why the discovery script(s) are failing.

    The supported agent operating systems are as follows:

    • Windows Server 2019 - Standard, Datacenter, Server Core
    • Windows Server 2016 - Standard, Datacenter, Server Core
    • Windows Server 2012 R2 - Standard, Datacenter, Server Core
    • Windows Server 2012 – Standard, Datacenter, Server Core
    • Windows 10 - Enterprise, Pro

    System requirements for System Center Operations Manager
    https://docs.microsoft.com/en-us/system-center/scom/system-requirements?view=sc-om-2019

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Stoyan ChalakovMVP Thursday, January 9, 2020 2:58 PM
    • Marked as answer by Gergo K Thursday, April 30, 2020 1:08 PM
    Thursday, January 9, 2020 2:21 PM

All replies

  • Hi,

    SCOM 2019 doesn't support Windows Server 2008 R2, which may also be the reason why the discovery script(s) are failing.

    The supported agent operating systems are as follows:

    • Windows Server 2019 - Standard, Datacenter, Server Core
    • Windows Server 2016 - Standard, Datacenter, Server Core
    • Windows Server 2012 R2 - Standard, Datacenter, Server Core
    • Windows Server 2012 – Standard, Datacenter, Server Core
    • Windows 10 - Enterprise, Pro

    System requirements for System Center Operations Manager
    https://docs.microsoft.com/en-us/system-center/scom/system-requirements?view=sc-om-2019

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Stoyan ChalakovMVP Thursday, January 9, 2020 2:58 PM
    • Marked as answer by Gergo K Thursday, April 30, 2020 1:08 PM
    Thursday, January 9, 2020 2:21 PM
  • Hi,

    I know, that it is not supported. On the other hand we have around 180 server, from ~400, where the script runs perfectly fine, which are also running on 2008R2. 

    Best Regards,

    Gergő

    Thursday, January 9, 2020 3:09 PM
  • If you have that many Windows Server 2008 R2 servers monitored by SCOM 2019, I would strongly suggest you to start upgrading them, because as of now you are running an unsupported scenario.

    While it is unsupported, some things may still work, but there's absolutely no guarantee, the DPM management pack has most likely not been configured for Windows Server 2008 R2 operating systems.

    The LibraryAndDriveDiscovery.ps1 discovery script can be found here:

    https://systemcenter.wiki/?GetElement=Microsoft.SystemCenter.DataProtectionManager.2011.Discovery.LibraryAndDriveDiscovery&Type=Discovery&ManagementPack=Microsoft.SystemCenter.DataProtectionManager.Discovery&Version=5.0.1401.0

    You can try running it manually on your Windows Server 2008 R2 server to see if it even runs.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Thursday, January 9, 2020 3:18 PM
  • The upgrades are now in progress, but it will take some time unfortunately. 

    I executed the script with the following parameters, tried with  my account and with local system account and it works fine. 

    $sourceType = 0
    $sourceId =([guid]::NewGuid().ToString("A"))
    $managedEntityId = ([guid]::NewGuid().ToString("B"))
    $dpmServerName = "Servername"

    If I tried it with the possible real parameters, for sourceId I tried the ID of the Microsoft.SystemCenter.DataProtectionManager.2011.Library.DPMServer and for managedEntityId the id of the target, then i got a null reference exception at "$discoveryData = $api.CreateDiscoveryData(0,$sourceId,$managedEntityId)" command.

    I tried multiple 2008R2 server, where the script was successful if it ran by the SCOM agent and where the script fails, but the result is the same. 

    I found another script, which fails with the same EM: the DPMServerAvailability.ps1, I executed this script too, but no issue here. 

    Friday, January 10, 2020 9:41 AM
  • Difficult to say what the issue could be, it could be many things as it's an unsupported operating system.

    Blog: https://thesystemcenterblog.com LinkedIn:

    Friday, January 10, 2020 10:56 AM