The System Center Operations Manager Support Team Blog

This is the OpsMgr 2007 blog for the Microsoft support team. If you were looking for the SCOM 2007 or MOM 2005 blog then you are in the right place.

OpsMgr 2007 solution: Console Exception in the UNIX/Linux Servers view–"Value cannot be null"

OpsMgr 2007 solution: Console Exception in the UNIX/Linux Servers view–"Value cannot be null"

  • Comments 1
  • Likes

toolsignI recently worked on this issue and since I didn't see the resulting solution published I thought it would be worth a mention here.


In this scenario, the Operations Manager 2007 R2 Cross Platform Agent with Cumulative Update 2 had been deployed to several Redhat Enterprise Linux servers.  Following the deployment, while checking the Health of the servers through the UNIX/Linux Servers view in the Administration Pane of the console the following error was received:

Value cannot be null
Parameter name: key

The following information was gathered when the operation was attempted.  The information may appear cryptic but provides context for the error.  The application will continue to run:

System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at Microsoft.SystemCenter.CrossPlatform.UI.Common.UnixComputerOperatingSystemHelper.JoinCollections(ReadOnlyCollection`1 managementServers, ReadOnlyCollection`1 unixcomputers, ReadOnlyCollection`1 operatingSystems)
   at Microsoft.SystemCenter.CrossPlatform.UI.Common.UnixComputerOperatingSystemHelper.GetUnixComputerOperatingSystemInstances(String criteria)
   at Microsoft.SystemCenter.CrossPlatform.UI.Administration.UnixAgentQuery.DoQuery(String criteria)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.DoQuery(String criteria, Nullable`1 lastModified)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.FullUpdateQuery(CacheSession session, IndexTable& indexTable, Boolean forceUpdate, DateTime queryTime)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.InternalSyncQuery(CacheSession session, IndexTable indexTable, UpdateReason reason, UpdateType updateType)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.InternalQuery(CacheSession session, UpdateReason reason)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.TryDoQuery(UpdateReason reason, CacheSession session)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.DoQueryJob(Object sender, ConsoleJobEventArgs args)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)


This was ultimately due to a NULL value for one of the objects in the related tables. 


To begin with, the object with the NULL value must be identified.  The following SQL statement should return a list of objects from which you can parse for a NULL value in one of the fields.  The NULL value may correspond with a machine name Windows.Computer.

Please execute this query against the Root Management server (RMS) and any Management Severs (MS) servers until you find the offending NULL entry.  Simply replace the 'fqdn.of.managementserver' as noted below with the correct name:

SELECT [T].[Id], [T].[Name], [T].[Path], [T].[FullName], [T].[DisplayName], [T].[IsManaged], [T].[IsDeleted],
[T].[LastModified], [T].[TypedManagedEntityId], [T].[MonitoringClassId], [T].[TypedMonitoringObjectIsDeleted],
[T].[HealthState], [T].[StateLastModified], [T].[IsAvailable], [T].[AvailabilityLastModified], [T].[InMaintenanceMode],
[T].[MaintenanceModeLastModified], [PXH].[BaseManagedEntityId] AS [HealthServiceId],
[PXH].[DisplayName] AS [ProxyAgentPrincipalName] FROM dbo.ManagedEntityGenericView AS T
INNER JOIN dbo.ManagedType AS MT 
    ON MT.[BaseManagedTypeId] = 'B4A14FFD-52C8-064F-C936-67616C245B35'
INNER JOIN dbo.BaseManagedEntity AS BME 
            BME.[BaseManagedEntityId] = T.[Id]
            AND BME.[BaseManagedTypeId] = MT.[ManagedTypeId]      
INNER JOIN dbo.Relationship AS R 
    ON R.[TargetEntityId] = T.[Id]
INNER JOIN dbo.BaseManagedEntity AS PXH 
    ON PXH.[BaseManagedEntityId] = R.[SourceEntityId]
            T.[IsDeleted] = 0 AND T.[TypedMonitoringObjectIsDeleted] = 0 AND R.[IsDeleted] = 0 AND
            R.[RelationshipTypeId] = dbo.fn_ManagedTypeId_MicrosoftSystemCenterHealthServiceShouldManageEntity()
          ) AND ('fqdn.of.managementserver' = PXH.[DisplayName]))

In order to resolve the issue completely and in a supported manner, it was important to leverage the same underlying process by which an Agent is removed as that used by the Console when deleting an agent.  As a result, the following stored procedure was executed against the Operations Manager database using the GUID identified in the initial query above which contained the NULL value.

Cleanup process:

DECLARE @EntityId uniqueidentifier;
DECLARE @TimeGenerated datetime;

-- change "GUID" to the ID of the invalid entity
SET @EntityId = 'GUID';
SET @TimeGenerated = getutcdate();


EXEC dbo.p_TypedManagedEntityDelete @EntityId, @TimeGenerated;


Hope this helps,

Nicholas Dodge | Senior Support Escalation Engineer

The App-V Team blog:
The WSUS Support Team blog:
The SCMDM Support Team blog:
The ConfigMgr Support Team blog:
The SCOM 2007 Support Team blog:
The SCVMM Team blog:
The MED-V Team blog:
The DPM Team blog:
The OOB Support Team blog:
The Opalis Team blog:

clip_image001 clip_image002

  • Just came across this issue at the customer. Solution worked like a charm. Thanks a million!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment