By Dina Ayoub

Program Manager on SharePoint, MSFT

 

Who might find this post useful:

 

If you find yourself wondering what a SharePoint “Correlation ID” is whenever you get an unexpected error in SharePoint 2010, or what to do with it once you have it, then hopefully this blog post will shed some light on that.

 

This article may be useful to you if:

  • You’re a SharePoint user who happens to be performing an important action that should normally work, and get an Error page that says “An unexpected error has occurred”. The error also states this strange hyphenated string called the “Correlation ID” that looks something like this ab961971-84fa-45c7… etc; and you really need to find a solution for this problem, or figure out why it’s happening. Then you might want to call up your organization’s help desk and give them this Correlation ID so they can investigate what’s going on, if all other troubleshooting steps don’t help.  Here’s a screenshot of what this might look like:
    Error Message with Correlation ID
  • You’re a SharePoint support admin trying to help someone with a problem, and can’t figure it out using all the regular troubleshooting steps you normally follow, you may want to ask them for this correlation ID, that will help you figure out the details of what is happening.
  • You’re a SharePoint administrator and you find a problem is occurring (such as failed requests or a slow page) and want to track the problem, you may want to get one of the correlation IDs for the requests that are exhibiting the problematic behavior, and use that correlation ID to investigate deeper.  If no failure is happening, so you aren’t getting an error message with this correlation ID, then you might want to enable developer dashboard; and that will allow you to see the correlation ID generated by that page request.  Here’s what it might look like on the developer dashboard:Developer Dashboard Correlation ID
  • You just happen to be looking through the ULS logs for any reason, and a request piques your interest, you can see its correlation ID in the log file.

What it is:

The correlation ID is a GUID (globally unique identifier) that is automatically generated for every request that the SharePoint web server receives.

 

Basically, it is used to identify your particular request, and it persists throughout further communications, if any, between the other servers in the farm. Technically, this correlation ID is visible at every level in the farm, even at a SQL profiler level and possibly on a separate farm from which your SharePoint site consumes federated services. So for example, if your request needs to fetch some information from an application server (say, if you are using the web client to edit an Excel spreadsheet), then all the other operations that occur will be linked to your original request via this unique correlation ID, so you can trace it to see where the failure or error occurred, and get something more specific than “unknown error”.

 

How to use it:

If you’re an end user, you might not be able to do much more without help, since you won’t have access to the logs that provide the information. In that case, you can stop here and with this understanding of what a correlation ID is, take note of it, call up helpdesk, explain your problem, and try to help them diagnose the problem. If they can’t figure it out give them the correlation ID you see on your error message. You may need to refer them to this post if they are unsure on how to use that ID.

 

As an IT Pro or admin, to figure out what happened, you need to find the ULS logs for the time at which this event occurred, and search for the Correlation ID in those logs. You may have to look across several of the web front ends to find the one that has the correlation ID you’re looking for. This may give you some insight into what happened right before the request that generated the error, what error messages showed up or what events were triggered because of this error (if any). You can use a tool such as ULSViewer to facilitate looking at this data and filtering out the requests you don’t need to look at.

 

Example #1:

  1. User gets this error, and gives you (the admin) the correlation ID and date/time of the incident:Error Message Correlation ID
  2. Find the log directory, and the date you’re looking for and open that file in Excel:Find the Log File
  3. Find the correlation ID that you’re looking for. You can filter by the level of the events as well to get a good idea of what’s going on:Finding the Correlation ID in Log Files
  4. If you don’t find the correlation ID, try another Web Server that was in rotation at the time of the issue reported.

 

Example #2:

In this example, there is a  business intelligence center provisioned on the root of the site.  The Excel Calculation Services service is running on the server, but there is no Excel Service Application created.

 

I browsed to the View Excel Services samples link from the main page Create Dashboards mouseover.  Before browsing, I opened ULSViewer in realtime mode (File | Open From | ULS).

 

Example 2 ULS Viewer Excel Services

(View a large version of this image)

 

Notes about the image:

  • Purple box + arrow shows the notification balloon.  If you click on this, you’ll get the notification popup.  By default when Critical events occur, they will show up here.  You can jump right to them in the log by double clicking.
  • Red box + arrow shows where you go after clicking on the critical event.  Notice that the line is also highlighted red.  When you automatically move to it, the active line will show blue (I moved up a line before taking the screenshot), but the point is that you can easily spot critical events when scrolling through a log as well.
  • Green box + arrow shows that after enabling Smart Highlight, as the mouse moves over any given element, it highlights every other string that matches that string.  This can also be very useful for quickly identifying a chain of events or common patterns that are repeating.
  • Blue box + arrow shows that the exact URL can also be searched for as it will show up in the log data.  I didn’t specifically do this, but ULSViewer also has a find dialog that could take you to this line very quickly.

More Information:

If you’d like to read more about this, take a look at these blog posts:

http://blogs.msdn.com/spses/archive/2009/12/18/sharepoint-2010-logging-improvements-part-1.aspx

http://blogs.msdn.com/spses/archive/2010/03/11/sharepoint-2010-logging-improvements-part-2-introducing-developer-dashboard.aspx

 

So that’s the correlation ID in a nutshell. If you have any questions, comments or feedback, please feel free to post here. Thanks for reading.

http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?ID=353

Tags

Comments are closed