Friday, January 1, 2010

Correlation ID (SharePoint 2010 Logging enhancements)

Correlation ID      
While using MOSS 2007 some time or the other you would have come across the SharePoint 2007 error screen showing a message “An unexpected error has occured” which was not at all helpful in finding out what the error was and how to solve the error and then you would have to go through the huge log file to find out what the error was, all in all it was a very irritating process. In SharePoint 2010 a deep investment has been made to make these error messages more meaningfull. Now every error message comes with a Corellation ID. Events such as page loads and other common events within ULS logs have a corresponding Correlation ID. This ID is grouped with other events based on the same conversation. For example, User A hits a WFE and accesses a site. All the events in the ULS logs that correlate with User A’s login all share the same correlation ID. This makes mining the ULS logs easy in that you can filter based on correlation ID. If the conversation hits multiple servers in the farm, those other servers maintain the exact same correlation ID. A common scenario for this is when a WFE is calling a web service on an application server. It’s also possible to filter on Correlation ID via a SQL profiler trace so you can truly get a farm wide picture of what happened at each level of the conversation. SharePoint error pages also expose a correlation ID along with time stamp of the error so now it’s simple to find the conversation in the servers corresponding ULS logs.
Let me show you an example on how to use the Correlation ID in Sharepoint 2010.
While installing SharePoint at the final step where all the Service applications are set up (Using the Central Admin Configuration Wizard) I got an error that the Service Application proxy “User Profile Service Application” could not be provissioned and it had a Correlation ID with it.





So I copied the Correlation ID and opened the latest  log file stored in the “14 Hive” in the LOGS folder and searched for that Correlation ID and found that the request to the UserProfile Web Service (https://://ProfilePropertyService.svc) was being timed out .






So then I opened the IIS Manager and Opened the UserProfile Web service’s Web.Config file and increased the Binding timeout from 20 secs to 50 secs and then I again ran the Server Configuration Wizard from Central administration and this time the User Profile Service Application was configured properly without any error.







The correlation ID helped me to find the exact error and so I was able to solve the error within no time. I think this is a fantastic feature which will save a lot of our time. Hope you all will make good use of this Correlation ID feature to find and solve the SharePoint errors that you get. 

1 comment:

  1. I was getting a similar error after installing a brother print driver to a network printer. Not sure why that did it but it did. After mucking about on searching for the file... I couldn't find it. I ended trying the site on my macbook, and it worked but after a few seconds it asked me if I wanted to update silverlight. And after updating silverlight on my Windows machines the page where I was getting the error worked again... so try reinstalling sliverlight was the answer for me.

    ReplyDelete