The SharePoint 2010 MP is one of the most difficult MPs to troubleshoot. From the surface it appears it have some magical configuration file and configuration tasks. But if you drill down into the nuts and bolts of the MP it’s really not magical at all.
First make sure you have followed all the steps in the MP Guides http://www.microsoft.com/en-us/download/details.aspx?id=4419
Also review the following KB article http://support.microsoft.com/kb/2690744
If you are running SCOM 2012 make sure you imported the helper MP http://www.microsoft.com/en-us/download/details.aspx?id=34697
Ok so I have done all that, but my SharePoint server still shows up as “Not monitored”
First I enable the DebugTrace by going to the Administration View. In the Tasks pane, I run “Set DebugTrace for SharePoint Management Pack (SCOM 2012)”
After a while I notice that I am getting the following error in the Operations Manager event log on my SharePoint server.
Log Name: Operations Manager
Source: Operations Manager
Event ID: 0
Level: Error
Computer: SP01.scom2k7.com.com
Description:
Cannot identify which SharePoint farm this server is associated with. Check the management pack guide for troubleshooting information.
So what does this mean?
I triple checked my configuration using the MP guide and KB2690744
I tried tweaking the SharePointMP.config file a few dozen times. But it didn’t fix the problem.
I start thinking this MP can’t be all that magical and I start to dissect the MP.
Frist I export all the MPs to XML using my MP2XML Pro tool.
Next I open up the Configure SharePoint Management Pack task and try to understand what it is actually doing. I found the script that is run by the “Configure SharePoint Management” Task in the SCOM 2012 Helper MP
After I review the PowerShell Script I conclude it only does three basic things.
- First it creates a Overrides MP called Microsoft.SharePoint.Foundation.2010.Override.xml.
I open up the Override MP and find out all it does is enable discovery and sets the interval and sync time for the discoveries. I know that this is not my issue so I move on.
– Second it Enables Agent Proxy on the the servers I listed in the SharePointMP.config file
Not so complex. I could have did this manually.
-Third it sets the Run-As profiles for the SharePoint Discovery/Monitoring Account
Ok so this one seems to be a little more magical! I can seem to create these from the console, as the Association is System. But I probably could have just created the associations the normal way. Not worth spending anymore time on this as I know its correct.
So now what? I have everything setup correctly but my SharePoint server still shows up as Unidentified!
I go back to the event log that I seen earlier.
Event ID: 0
Level: Error
Computer: SP01.scom2k7.com.com
Description:
Cannot identify which SharePoint farm this server is associated with. Check the management pack guide for troubleshooting information
What is causing this? After a few searches I don’t find anything useful. I know the alert is generated by the MP so lets search my exported MPs to see why it’s getting generated.
I search the exported MPs for “Cannot identify which SharePoint farm this server is associated with. Check the management pack guide for troubleshooting information” using Agent Ransack (My favorite file search tool)
I discover this text is coming from the Microsoft.SharePoint.Foundation.2010.xml management pack
I open up the text file and search for the “Cannot identify which SharePoint farm this server is associated with. Check the management pack guide for troubleshooting information”.
I discovery the text is thrown by a PowerShell script when the variable $global:EventLog_Fail_Identify_Farm I called.
I search for $global:EventLog_Fail_Identify_Farm
I discover that the error will be thrown if variable $global:Farm is equal to null.
Lets see what Get-Farm does.
I log into my SharePoint Server.
I launch the the SharePoint 2012 Management Shell and I get this error.
SharePoint Scripts are not working at all on my SharePoint server! The problem has nothing to do with SCOM. It’s a SharePoint issue.
I run a regular PowerShell Prompt and try to load the PowerShell extensions and I get this error
“Microsoft SharePoint is not supported with version 4.0.30319.296 of the Microsoft .Net Runtime.”
So how do I fix this? I search for this error and it turns out it is related to “Windows Management Framework 3.0” being installed. http://blog.supermega.pro/tag/microsoft-sharepoint-is-not-supported-with-version-4-0-30319-296-of-the-microsoft-net-runtime/
So I remove the Windows Management Framework 3.0
Reboot the SharePoint Server.
Just like that all my servers get discovered and everything starts to work!
If I find any of theses other errors in the future, now I know the process to troubleshoot it.
EventLog_Fail_Identify_Farm = "Cannot identify which SharePoint farm this server is associated with. Check the management pack guide for troubleshooting information.";
EventLog_Fail_Retrieve_Farm_And_Local = "Failed on retrieving information for SharePoint farm and Sharepoint local machine. Check the management pack guide for troubleshooting information.";
EventLog_Fail_Retrieve_OM_Value = "Failed on retrieving values from SharePoint object model.";
EventLog_Fail_Retrieve_Service = "Failed on retrieving {0} service from SharePoint farm {1}.";
EventLog_Fail_Retrieve_Object = "Failed to find {0} in SharePoint object model.";
bravo