Issues connecting SvcMgr 2012 to OpsMgr 2012 (Part 1)


This post is about an issue I encountered last week trying to connect Service Manager 2012 to Operations Manager 2012 in my lab Environment.

While configuring the connector using the “Operations Manager CI connector wizard” I received the following error :

An object of type MonitoringClass with Id 1d870aa6-edb4-7d13-3950-d3c73755d6bf was not found.

image

Daniele that is in touch with the product team already asked if this is a known issue and if there is a fix or an official workaround. We are waiting for them.

In the meantime I started to investigate myself.

I enabled SM trace, the following is the output captured while reproducing the issue :

[Verbose]      [Verbose_TextW]enter_01 <ManagementGroup.ctor|API>
[Verbose]      [Verbose_TextW]enter_02 <SdkDataAbstractionLayer.Connect|API>
[Information]  [Information_TextW]<SdkDataAbstractionLayer.Connect> Connect called with params: serverName = opsmgr-rms.domain  countryCode = ENU
[Verbose]      [Verbose_TextW]enter_03 <ClientDataAccess.ctor|API>
[Verbose]      [Verbose_TextW]leave_03
[Verbose]      [Verbose_TextW]leave_02
[Verbose]      [Verbose_TextW]leave_01
[Verbose]      [Verbose_TextW]enter_01 <ManagementGroup.GetManagementPacks|API>
[Information]  [Information_TextW]<ManagementGroup.GetManagementPacks> GetManagementPacks called with params: criteria = Name = ‘System.Library’
[Verbose]      [Verbose_TextW]enter_02 <ManagementGroup.GetManagementPacksList|API>
[Information]  [Information_TextW]<ManagementGroup.GetManagementPacksList> GetManagementPacks called with params: criteria = Name = ‘System.Library’
[Verbose]      [Verbose_TextW]enter_03 <TypeSpaceOperations.GetManagementPacksByCriteria|API>
[Verbose]      [Verbose_TextW]leave_03
[Verbose]      [Verbose_TextW]enter_03 <ManagementPackElementConstructor.CreateMultipleManagementPack|API>
[Verbose]      [Verbose_TextW]enter_04 <ManagementPackDatabaseReader.ctor|API>
[Verbose]      [Verbose_TextW]leave_04
[Verbose]      [Verbose_TextW]leave_03
[Verbose]      [Verbose_TextW]leave_02
[Verbose]      [Verbose_TextW]leave_01
[Verbose]      [Verbose_TextW]enter_01 <ManagementGroup.GetMonitoringClass|API>
[Verbose]      [Verbose_TextW]enter_02 <TypeSpaceCache.GetManagedType|API>
[Verbose]      [Verbose_TextW]enter_03 <TypeSpaceCache.GetType|API>
[Information]  [Information_TextW]<TypeSpaceCache.GetType> GetType called with params: managementPackObjectId = 1d870aa6-edb4-7d13-3950-d3c73755d6bf
[Error]        [Error_TextW]<TypeSpaceCache.GetType> GetType – MomManagementPackObject with Id = 1d870aa6-edb4-7d13-3950-d3c73755d6bf not found
[Verbose]      [Verbose_TextW]leave_03
[Verbose]      [Verbose_TextW]leave_02
[Verbose]      [Verbose_TextW]leave_01

And I found the following Error in Event Log :

The System Center Data Access service client threw an unknown exception while processing a type cache refresh notification.
The cache was not updated successfully:
System.InvalidCastException: Unable to cast object of type ‘System.DBNull’ to type ‘System.String’.
at Microsoft.EnterpriseManagement.Common.Internal.ImageReferenceGenerated..ctor(Result result)
at Microsoft.EnterpriseManagement.Configuration.MonitoringClass.Constructor.AddSingleSubElementTwo(Result row, Dictionary`2 objectIdToObjectDictionary)
at Microsoft.EnterpriseManagement.Configuration.ManagementPackElementConstructor.CreateMultiple[T,H](IList`1 dataAccessResult, ManagementGroup managementGroup, ManagementPack managementPack)
at Microsoft.EnterpriseManagement.Configuration.TypeSpaceCache.RefreshMonitoringClassCache(ReadOnlyCollection`1 typeCacheResultSets)
at Microsoft.EnterpriseManagement.Configuration.TypeSpaceCache.Refresh(Boolean forceDatabaseSync, ManualResetEvent acquireCacheUpdateLockEvent)
at Microsoft.EnterpriseManagement.ManagementGroupInternal.RefreshTypeCacheInternal(Boolean forceDatabaseSync, ManualResetEvent acquireCacheUpdateLockEvent)
at Microsoft.EnterpriseManagement.ManagementGroup.RefreshTypeCacheNotForce(Object eventToSignalOnLockAcquisition)

The first trace suggested me that SM is connecting to OpsMgr SDK and is unable to find a Management Pack Object with ID  = 1d870aa6-edb4-7d13-3950-d3c73755d6bf in the TypeSpaceCache, the second error suggested me that SDK client is unable to build the TypeSpaceCache because of a InvalidCastException, and this should be the reason why the object is not found. I verified with the following query that the Management Pack Object with ID = 1d870aa6-edb4-7d13-3950-d3c73755d6bf exists in OpsMgr DB :

Select * from ManagedType where ManagedTypeId = ’1d870aa6-edb4-7d13-3950-d3c73755d6bf’

image

Next I tried to build a small application that call the same SDK methods used by SM, and I ‘m able to reproduce the issue out of SM. The following is the source code :

ManagementGroup managementGroup;

managementGroup = new ManagementGroup(“opsmgr-rms.domain”);

MonitoringClass mc = managementGroup.GetMonitoringClass(new Guid(“{1d870aa6-edb4-7d13-3950-d3c73755d6bf}”));

The interested think here is that if I my application binds OpsMgr 2007 assemblies I’m able to reproduce the issue, if I bind OpsMgr 2012 assemblies the issue does not occur and Management Pack Object with ID = 1d870aa6-edb4-7d13-3950-d3c73755d6bf is retrieved successfully. Service Manager’s OpsMgr connectors use OpsMgr 2007 assemblies even connecting to OpsMgr 2012 and is affected by the issue.

In the next article (Part2)  I will post what I found using WinDbg and a possible workaround.

Italian version of this post is available here

- Fabrizio

About these ads
  1. #1 by Dennis on June 12, 2013 - 9:13 am

    HI Fabrizio,

    I ran into the same problem in my environment, In my case it was the Azure MP on the OM side causing the problem. Removing the Azure MP in OM fixed the SM connector issue.

    Cheers,
    Dennis

  1. Issues connecting SvcMgr 2012 to OpsMgr 2012 (Part 2) « Quae Nocent Docent

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 349 other followers

%d bloggers like this: