Friday, January 31, 2014

SharePoint 2010 Workflow: An unexpected error has occurred

Problem

You are developing existing workflows on your SharePoint 2010 farm development site.  You delete an existing workflow, while working in SharePoint Designer 2010.  You then test another workflow. After selecting Workflows from the list item dropdown menu, your browser is navigated to the standard helpful informative SharePoint 2010 error mesage:
An unexpected error has occurred
This error occurs no matter what list item workflow history you try to look at.  In fact, you cannot get to the list's workflow page at all.  Neither can you view workflow history or settings.  Troubleshooting steps follow.

Troubleshooting
  1. Restored the deleted workflow from the Recycle Bin, and then tested: still experienced error message.
  2. Noted the correlation ID presented in the error message.
  3. Launched ULSViewer, and then connected it to live feed.
  4. Searched for the correlation ID and found this event:
    System.ArgumentException: Column '[SomeColumnName]' does not exist. It may have been deleted by another user. /Path/To/List at Microsoft.SharePoint.SPFieldCollection.GetFieldByInternalName(String strName, Boolean bThrowException) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsText(Int32 iStatus) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsHtml(Int32 iStatus) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsHtml() at Microsoft.SharePoint.ApplicationPages.WorkflowPage.StrStatus(SPWorkflow wf) at ASP._layouts_workflow_aspx.__Render__control11(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  5. Noted the SomeColumnName in the event.  This column was completely unfamiliar.  Noted that the column type was not indicated.
  6. With ULSViewer up, tested the error for repeatability, by attempted several times to connect to a list item's workflow history page: error was reproducable and correlated with events appearing in the trace log, viewed in ULSViewer.
  7. In SharePoint Designer, checked Association Columns, but did not find SomeColumnName.  Also checked Local Variables, but also not successful.
  8. Attempted to view workflow information on an archived copy of the list co-located in the same site.  This was successful.
  9. Then, using SharePoint Designer, alternatively compared list column listings between the two versions: discovered a column in the archived list missing from the current one.  However, the displayed column name bore no resemblance to that shown in the ULS event message.
  10. Then, connected to the site as Administrator and added a new field, SomeColumnName, to the list, as single line string.  Tested again: unsuccessful.  However, the error message correlated with the error message changed:
    System.ArgumentException: Column '[SomeNewColumnName]' does not exist. It may have been deleted by another user. /Path/To/List at Microsoft.SharePoint.SPFieldCollection.GetFieldByInternalName(String strName, Boolean bThrowException) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsText(Int32 iStatus) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsHtml(Int32 iStatus) at Microsoft.SharePoint.Workflow.SPWorkflow.GetIStatusAsHtml() at Microsoft.SharePoint.ApplicationPages.WorkflowPage.StrStatus(SPWorkflow wf) at ASP._layouts_workflow_aspx.__Render__control11(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  11. Changed column type to Choice, populated some choices, and repeated test: still unsuccessful.  Same event message appearing in ULS.
  12. Removed all workflows from the site and then again tested:  still experienced error message.
    1. Conclusion: issue remains tied to list.
  13. Exported list from production farm, using CA, and then imported to development farm site using PowerShell.  Connected to site through SharePoint Designer: the workflows were not exported.  Testing unnecessary.
    1. Conclusion: workflows are not stored at the list level.
  14. Exported site (not site collection) from production farm, using PowerShell, and then restored site to dev farm using PowerShell. Opened browser, navigated to list, checked workflow history: this time able to view without error, but no history was listed. Navigated to list workflows and found none.
    1. Conclusion: workflows are not stored at the site level.
  15. Stopped IIS on both WFEs. In CA,"detached" content databases from web application (this is a SharePoint detach). Restored backup copies of DBs (in SQL Svr); and then mapped appropriate accounts to restored DBs (in SQL Svr). In CA, "attached" content databases to web application. Started IIS on both WFEs.  Navigated to list and checked workflows: no error, workflow history existed, workflows worked.
    1. Conclusion: workflows are stored at the site collection level.
Review

This was my first entry into developing workflows and troubleshooting them.  Further research subsequent to implementing this solution identified a possible workaround not requiring database restore methods (reference 4).

Lessons Learned

Recovery from a poorly handled workflow deletion requires a site collection restore.

References
  1. SharePoint 2010 List workflow status – unexpected error
  2. SharePoint 2010: Manager
  3. Troubleshoot workflow errors (SharePoint Foundation 2010)
  4. How to migrate SharePoint 2010 List based workflows
  5. SharePoint Designer Workflow Overview
  6. How to Delete/Remove a Workflow from SharePoint Designer
  7. HOWTO: Remove a Workflow from a List or Library

Tuesday, January 21, 2014

SharePoint 2010: Provision the Web Analytics Service Application

Introduction

This posting presents the steps for provisioning a SharePoint 2010 farm's Web Analytics service application.

Procedure
  1. Log into Central Administration under an administrator account
  2. Navigate to; CA > Application Management > Manage Service Applications.
  3. On the Service Applications ribbon, click New, and then click Web Analytics Service Application.
  4. Enter the appropriate information for these properties:
    1. Name
    2. Application Pool
    3. Application Pool Security Account
    4. Database Server
    5. Staging Database Name
    6. Reporting Database Name
    7. Data Retention Period
  5. Click OK.
  6. In Central Administration, navigate to: CA > System Settings > Services on Server.
  7. From the Server dropdown, select the farm Server on which you want to run the Web Analytics Web and Web Analytics Data processing Services.
  8. Start these services (Order is unimportant).
  9. In Central Administration, navigate to: CA > Monitoring > Usage Data Collection Settings
  10. Configure options as desired.
  11. In Central Administration, navigate to: CA > Monitoring > Configure diagnostic logging
  12. Configure options as desired.
References

Monday, January 20, 2014

Windows 7: Error 7038: The nvUpdatusService service was unable to log on as .\UpdatusUser

Problem

The following error events occurs in the Windows 7 System log:
Log Name: System Source: Service Control Manager Date: [date/time] Event ID: 7000 Task Category: None Level: Error Keywords: Classic User: N/A Computer: Main Description: The NVIDIA Update Service Daemon service failed to start due to the following error: The service did not start due to a logon failure. Event Xml: ... Log Name: System Source: Service Control Manager Date: [date/time] Event ID: 7038 Task Category: None Level: Error Keywords: Classic User: N/A Computer: Main Description: The nvUpdatusService service was unable to log on as .\UpdatusUser with the currently configured password due to the following error: Logon failure: the specified account password has expired. To ensure that the service is configured properly, use the Services snap-in in Microsoft Management Console (MMC). Event Xml: ...
Solution
  1. Start Services.msc.
  2. Scroll down to NVIDIA Update Service Daemon.
  3. Double-click it.
  4. Select the Logon tab.
  5. Select the option: Log on as: Local System Account.
  6. Select the General tab.
  7. Click Start.  A prompt will appear.
  8. Click OK, and then click OK again.
References

Windows 7: Error event 2: Session "Circular Kernel Context Logger" stopped due to the following error: 0xC0000188

Problem

The following error appears in the System event log:

Log Name: Microsoft-Windows-Kernel-EventTracing/Admin Source: Microsoft-Windows-Kernel-EventTracing Date: [date/time] Event ID: 3 Task Category: Session Level: Error Keywords: Session User: SYSTEM Computer: Main Description: Session "Circular Kernel Context Logger" stopped due to the following error: 0xC0000188 Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">   <System>     <Provider Name="Microsoft-Windows-Kernel-EventTracing" Guid="{B675EC37-BDB6-4648-BC92-F3FDC74D3CA2}" />     <EventID>3</EventID>     <Version>0</Version>     <Level>2</Level>     <Task>2</Task>     <Opcode>14</Opcode>     <Keywords>0x8000000000000010</Keywords>     <TimeCreated SystemTime="date" />     <EventRecordID>1778</EventRecordID>     <Correlation />     <Execution ProcessID="4" ThreadID="176" />     <Channel>Microsoft-Windows-Kernel-EventTracing/Admin</Channel>     <Computer>Main</Computer>     <Security UserID="S-1-5-18" />   </System>   <EventData>     <Data Name="SessionName">Circular Kernel Context Logger</Data>     <Data Name="FileName">C:\Windows\system32\WDI\LogFiles\BootCKCL.etl</Data>     <Data Name="ErrorCode">3221225864</Data>     <Data Name="LoggingMode">128</Data>   </EventData> </Event>
Troubleshooting
  1. Ran Err.exe to view the error code text.
  2. Launched Computer Management and navigated to: Performance > Data Collector Sets > Startup Event Trace Sessions.
  3. Right-clicked Circular Kernel Context Logger.
  4.   Checked File tab to change file options, but found options disabled:
  5. Searched Registry to find appropriate key that controls log file size, as suggested by this reference, but found not one but several keys (through search for "Circular Kernel Context Logger") having this property:  
    HKLM\SYSTEM\ControlSet001\Control\WMI\Autologger\Circular Kernel Context Logger
    HKLM\SYSTEM\ControlSet002\Control\WMI\Autologger\Circular Kernel Context Logger
    HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\Circular Kernel Context Logger

    so, uncertain which to adjust.
My Solution
 
Disable Circular Kernel Context Logger.  Given that this workstation was not critical, disabling this logging seemed the most practical approach.

NOTE: see comment from Anonymous below regarding control sets.

References

Saturday, January 18, 2014

SharePoint 2010 Health Analyzer: The timer service failed to recycle

Problem

You find the following entry in the SharePoint 2010 Central Administration Review problems and solutions listing:

TitleThe timer service failed to recycle.
Severity2 - Warning
CategoryPerformance
ExplanationThe last attempt to recycle the timer service failed as have most of the other attempts during the past week. Recycling typically fails because other timer jobs are running when the recycle is scheduled. To view which jobs blocked the recycle view the history for the recycle job and click on the failed status link for more information. The error message for the failed job entry will contain a list of jobs that were still running. The history for the recycle job can be found at: [path to timer job history for the associated timer job]
RemedyChange the schedule for the timer recycle job so that it does not conflict with other long-running timer jobs. This can be done from the central administration site at [path to timer job history for the associated timer job].  For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=142615".
Failing Servers[server name list]
Failing ServicesSPTimerService (SPTimerV4)
Rule SettingsView
 
Troubleshooting
  1. Navigate to the timer job history and see the list of instances that failed. 
  2. Clicking the Failed status link, the following error message is seen: The timer service was not recycled because the following jobs were still running: Microsoft SharePoint Foundation Usage Data Import.
  3. CA > Monitoring > Timer Job Status, Job Definition: Timer Service Recycle, View: Job Definition
    1. Scheduled to run daily @ 6PM on all farm servers
    2. Duration : 00:10:30.
  4. CA > Monitoring > Timer Job Status, Job Definition: Microsoft SharePoint Foundation Usage Data Import, View: Job Definition
    1. Scheduled to run every 30 minutes on all farm servers
    2. Duration: varies between 6 and 9 hours
    3. Progress has been stuck at 0% for all farm servers for many hours.
    4. Reviewing history: when first started, completed in 2-3 hours.  Now, two weeks later, completes in 6-9 hours.  Steady increases in duration logged over this period.
Solution
  1. At next maintenance window, bounced servers (for other maintenance as well).  This effectively restarted the SharePoint 2010 Timer service
  2. Durations had reached 11+ hours for Microsoft SharePoint Foundation Usage Data Import jobs on all servers.
  3. Reviewed job history for Microsoft SharePoint Foundation Usage Data Import:
    1. Durations dropped from over 11 hours down to minutes.
      1. Application Server: few minutes
      2. WFE1: several minutes
      3. WFE2: 10+ minutes.
    2. Difference between WFEs is interesting.  Will need to research this.
  4. Manually started Timer Service Recycle job
  5. Checked Timer Service Recycle job history several hours later:
    1. Succeeded for all servers.
  6. Reopened issue, and then clicked Reanalyze Now.
  7. Checked report a few minutes later:
    1. Issue gone.
This is only a temporary solution until I can get the machines patched through December 2013 CU, which, according to one of the references below, is one solution to this problem.

Notes
  • Server OS: Windows 2008 R2
  • SharePoint Farm patch level: 14.0.6123.5000
  • Verified that KB2775511 not installed on server
References

Error 6398: The Execute method of job definition... threw an exception

Problem

This posting details the troubleshooting steps taken to resolve this particular version of error 6398 (below). 

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          date/time
Event ID:      6398
Task Category: Timer
Level:         Critical
Keywords:      
User:          [a farm service account]
Computer:      [a farm server]
Description:
The Execute method of job definition 
Microsoft.Office.InfoPath.Server.Administration.FormsMaintenanceJobDefinition 
(ID 47448841-f622-4c46-a01a-17a15800e9b2) threw an exception. More information 
is included below. Access to the path 
'C:\ProgramData\Microsoft\SharePoint\Config\8efbf9e5c7924dcf9f9341a2c482728c' 
is denied.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-SharePoint Products-SharePoint 
Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
    <EventID>6398</EventID>
    <Version>14</Version>
    <Level>1</Level>
    <Task>12</Task>
    <Opcode>0</Opcode>

Troubleshooting Steps
  1. Checked each farm server to determine where the issue was occuring.  Found that it only occurred on the farm application server.
  2. Navigated to: C:\ProgramData\Microsoft\SharePoint\Config.
  3. Right-clicked the folder and selected Properties.
  4. Selected the Security tab.  Found two SIDs listed that failed to eventually resolve to any specific user or group name.  Likely corrupted.
  5. Checked the Security tab for the same folders on the other two farm servers and found two groups that appeared in these but not for the application server: WSS_ADMIN_WPG and WSS_WPG.
  6. Added these two groups to the folder and configured their permissions as seen for the other two farm servers.  Left the two unassociated SIDs in place.  Will remove after a week.
References

SharePoint 2010: Change File Icon

Introduction

This post walks you through the process of changing the icon associated with a file listed in a SharePoint 2010 document library, such as the PDF icon.  Icons for documents listed in a library are typically 16x16 pixels in dimension.  The PDF icon will be changed in this post.

Solution
  1. Download the PDF from the Adobe web site.
  2. In any document library in which PDFs are stored, right click on the PDF icon and choose Properties.
  3. Note the filename for the icon.
  4. For each server in the farm on which SharePoint 2010 is installed:
    1. Navigate to: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES.
    2. Scroll through the images to find the filename identified in step 3 above.
    3. To support rollback if necessary change the name of this file (e.g., filename_OLD.png).
    4. Copy the new icon file to this location.
    5. Rename the file to the same name used by the old file.
    6. Restart IIS.
    7. Verify that the new icon appears as expected.
References

Thursday, January 16, 2014

SharePoint 2010 Health Analyzer: Missing server side dependencies

Problem

The following issue appears in the SharePoint 2010 Central Administration Review problems and solutions report:

TitleMissing server side dependencies.
Severity1 - Error
CategoryConfiguration
Explanation[MissingWebPart] WebPart class [baf5274e-a800-8dc3-96d0-0003d9405663] is referenced [22] times in the database [CA-Content-DB], but is not installed on the current farm. Please install any feature/solution which contains this web part. One or more web parts are referenced in the database [CA-Content-DB], but are not installed on the current farm. Please install any feature or solution which contains these web parts.
[MissingWebPart] WebPart class [9f56656f-6aa3-0d55-a812-711bf65864ea] is referenced [101] times in the database [CA-Content-DB], but is not installed on the current farm. Please install any feature/solution which contains this web part. One or more web parts are referenced in the database [CA-Content-DB], but are not installed on the current farm. Please install any feature or solution which contains these web parts.
[MissingWebPart] WebPart class [874f5460-71f9-fecc-e894-e7e858d9713e] is referenced [63] times in the database [CA-Content-DB], but is not installed on the current farm. Please install any feature/solution which contains this web part. One or more web parts are referenced in the database [CA-Content-DB], but are not installed on the current farm. Please install any feature or solution which contains these web parts.
RemedyFor more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=142689".
Failing Servers 
Failing ServicesSPTimerService (SPTimerV4)
Rule SettingsView

Solution
  1. In Central Administration, navigate to: CA > Application Management > Manage Service Applications > Search Service Application > Manage.  This takes you to the SearchAdministration page.
  2. Next, navigate to: CA > Application Management > Manage Service Applications > Search Service Application > Manage > Farm Search Administration.  This takes you to the SearchFarmDashboard page.
  3. Then, navigate to: CA > Monitoring > Health Analyzer > Review problems and solutions.
  4. Click the issue link, click Reanalyze Now, and then click Close.
  5. Wait a few minutes, and then refresh the page.
References

SharePoint 2010 Health Analyzer: The Unattended Service Account Application ID is not specified or has an invalid value

Problem

The following issue appears in the SharePoint 2010 Central Administration Review problems and solutions report:

TitleThe Unattended Service Account Application ID is not specified or has an invalid value.
Severity2 - Warning
CategorySecurity
ExplanationThe Unattended Service Account is a single account that all documents can use to refresh data. It is required when connecting to data sources external to SharePoint, such as SQL. Without a valid Unattended Service Account Application ID, Visio Graphics Services will not be able to refresh Web Drawings that are connected to external data sources.
The rule for the Unattended Service Account Application ID failed. The ID does not exist. Visio Services
RemedyTo resolve this issue, the Visio Graphics Services administrator must provision the Secure Store Service, create a target application, and assign the ID of this target application to this setting. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=142617".
Failing Servers 
Failing ServicesVisioGraphicsService
Rule SettingsView

Solution

This issue may occur if the Secure Store Service or Secure Store Target Application have not yet been configured.
  1. In farm Central Administration, navigate to: CA > Application Management > Service Applications > Manage Service Applications > Secure Store Service Application.
  2. Review the available target applications and determine which one to use. 
    If you see the error, "The Secure Store Service application Secure Store Service is not accessible," go to this reference for steps on resolving it.
  3. Note down the Target Application ID associated with the selected target application.  For this posting, VisioGraphicsApp01 is used.
  4. Now navigate to: CA > Application Management > Service Applications > Manage Service Applications > Visio Graphics Service Application > Global Settings.
  5. Enter the Target Application ID above into the Application ID field, and click OK.
  6. Navigate back to: CA > Monitoring > Health Analyzer > Review problems and solutions.
  7. Click on the issue again, then click the Reanalyze Now button, and then click Close.
  8. Wait a few minutes, and then refresh the page.
References

Health Analyzer: The Visio Graphics Service has a minimum cache age setting that may cause a security issue

Problem

The following issue appears in the SharePoint 2010 Central Administration Review problems and solutions report:

TitleThe Visio Graphics Service has a minimum cache age setting that may cause a security issue.
Severity1 - Error
CategoryPerformance
ExplanationSetting minimum cache age to 0 minutes may leave the Visio Graphics Service open to a denial of service (DoS) attack. A value of 0 for this setting may lead to large processor and network load of the Visio Graphics Service and SharePoint, decreasing the expected performance of both. However, increasing this value means that users will not see their Web Drawings refreshing as frequently.
The minimum cache age rule for value 0 failed. Visio Services
RemedyThe resolve this issue, the Visio Graphics Service administrator must assign a value greater than 0 minutes to this setting. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=142657".
Failing Servers 
Failing ServicesVisioGraphicsService
Rule SettingsView

Solution

You may see this issue appear if, after testing Visio services, you forget to change the cache age settings back to their recommended value ranges.  To solve:
  1. Go to farm Central Administration.
  2. Navigate to: CA > Application Management > Manage Service Applications > Visio Graphics Services Application > Global Settings.
  3. Set Minimum Cache Age to a value > 5 (minutes).
References

Wednesday, January 15, 2014

SharePoint 2010: PowerShell scripts for generating farm inventory

Introduction
In this post, I present PowerShell scripts that I use to generate various listsings, such as sites, lists, permissions, etc.

Inventory Listing of Farm Sites and their Configurations

This script generates a listing of all sites in the farm, across all web applications, that includes such configuration details as: Create Date, Create Author, Template name and ID, RecycleBinEnabled, etc.  There are more fields available than included in this script - to find out all of the available fields, pipe the base script into the Get-Member object.
Add-PSSnapin Microsoft.SharePoint.PowerShell Get-SPWebApplication http://[your website] | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, Name, Created, URL, ID, ParentWebID, Language, WebTemplate, WebTemplateID, Theme, IsRootWeb, Author, Description, RecycleBinEnabled, SiteAdministrators, SiteGroups | Export-CSV \\[intranet location]\results.csv -NoTypeInformation

Inventory Listing of Farm Lists and their Configurations

$SiteLists = foreach ($site in get-spsite) { foreach ($web in $site.AllWebs) { foreach ($list in $web.lists) {$list} } } $SiteLists | Select parentWebURL, parentWeb, Title, Hidden, Author, Created, itemCount, Description | Export-CSV \\[intranet location]\FileName.csv -NoTypeInformation

Inventory Listing of installed SharePoint products

Get-WmiObject -Class Win32_Product | Where {$_.Name -like “*SharePoint*”} | Sort -Property Name | ft -Autosize

References

Monday, January 13, 2014

SharePoint Designer 2010: This page cannot be edited in SharePoint Designer

Problem

You connect to a SharePoint 2010 farm site through SharePoint Designer 2010 in order to edit a page at the site.  After successfully connecting to the site and checking out the page, when you then click the Edit link, you experience this prompt:
Solution
  1. On seeing this prompt, click Cancel.
  2. Undo the checkout.
  3. Go to a list view of the pages
  4. Select the page.
  5. On the All Files ribbon, click the Detach from page Layout button.
  6. Proceed to edit as normal.
References

Friday, January 10, 2014

SharePoint 2010: Farm Database Server memory

Problem

You have installed a new three-tier, SharePoint 2010 farm to virtual machines hosted on Microsoft Hyper-V.  The farm employs SQL Server 2008 R2.  After some time has elapsed, your systems admin informs you that the VM hosting the database server is using 32 GB RAM and this usage continues to climb.  Traffic to the farm is steady and not increasing.

Discussion

SQL Server 2008 R2 can dynamically adjust its buffer pool (cache) size in order to minimize paging.  It will continue to use memory up to that available.  This is normal behavior. 

By default, SQL Server 2008 R2 maximum server memory is set to 2147483647 MB.  If the VM has not been configured for maximum memory, SQL Server will continue to increase its usage of virtual memory to the maximum it can. 

The Maximum Server memory setting configures the buffer pool memory limit.  It does not affect the amount of memory that SQL Server allocates for other processes.

Solution
  1. Launch SQL Server Management Studio.
  2. In Object Explorer, right-click the server name in the tree (top item).
  3. Choose Properties (at bottom of list).  The Server Properties dialog appears.
  4. In the selection pane of the dialog, select Memory.
  5. In the Maximum server memory (in MB) field, enter the maximum memory you want to set.  Set this to less than the actual memory allocated to the VM or physical memory available.  Leave two GB or so for other SQL Server and Windows processes.  See the References for guidance on memory allocation.  You can adjust SQL Server Maximum server memory without restarting the server. 
    After you make this adjustment, server memory usage will drop initially, but then gradually increase again.  This second increase is due to Hyper-V locking the available memory
  6. Click OK.

References

Thursday, January 2, 2014

Error: The trial period for this product has expired.

Problem

Follows are the troubleshooting steps taken in order to resolve the following message that appeared when connecting to a SharePoint 2010 farm site collection using a standard AD user account:
Error: The trial period for this product has expired
The solution to this problem was unexpected and thus documented here.

Farm is SharePoint 2010, version 14.0.7015.1000 (SP2), with topology : SQL1, APP1, WFE1 and WFE2.  New installation.

Troubleshooting Steps
  1. Remoted directly into a farm server, as system administrator, and then connected to Central Administration.  Was able to connect to CA.
  2. Using the same browser, opened tab to connect to site collection.  Successful: site collection home page was displayed.
  3. On workstation, under normal account, opened a new browser and again connected to site collection.  Unsuccessful: same error message displayed.
  4. As systems administrator, remoted into another farm server, opened a browser, and then connected to the site collection.  Unsuccessful: experienced same error.
    Apparently, by first logging into CA and then connecting to the site collection, I was able to bypass the issue causing the problem.  Conclusion:  the root cause of the issue was somehow related to permissions and was not related to a product key that was a trial version and not the fully-licensed enterprise version.
    .
  5. Performed psconfig -cmd secureresources on all farm servers, per reference [1], logged in as the farm administration account. Results were successful on APP1and WFE1, but failed on WFE2 with the following error displayed in the same command prompt used to run the command on WFE2:
    ...
    Successfully secured the SharePoint resources.
    Performing configuration task 4 of 5
    Upgrading SharePoint Products...
    Failed to upgrade SharePoint Products.
    An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20140102-075746-95 was updated by [FarmAdministrationAccount], in the PSCONFIG (736) process, on machine [WFE2]. View the tracing log for more information about the conflict.
     ...
  6. After executing this command, performed IISRESET on all machines.
  7. Attempted to again connect to the farm site collection, but still experienced the error.
  8. Checked machine logs and found the following in the Application log:
    Event ID 100: Configuration of SharePoint Products failed. Configuration must be performed in order for th is product to operate properly. To diagnose the problem, review the extended error information located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\PSCDiagnostics_1_2_2014_7_57_34_563_1728581215.log, fix the problem, and run this configuration wizard again.

    Event ID 104: Failed to upgrade SharePoint Products. An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20140102-075746-95 was updated by [FarmAdministrationAccount], in the PSCONFIG (736) process, on machine [WFE2]. View the tracing log for more information about the conflict. Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20140102-075746-95 was updated by [FarmAdministrationAccount], in the PSCONFIG (736) process, on machine [WFE2]. View the tracing log for more information about the conflict. at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure) at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.PutObject(SPPersistedObject persistedObject, Boolean ensure) at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate() at Microsoft.SharePoint.Upgrade.SPUpgradeSession.Update() at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ContinueOnLocalThread(Guid id, Boolean consoleOutput) at Microsoft.SharePoint.Upgrade.SPManager.ContinueSessionOnLocalThread(Guid id, Boolean consoleOutput) at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
    ...
  9. Performed psconfig -cmd upgrade -inplace b2b -wait -force on WFE2, under the farm administration account. This failed with the following error displayed in the command prompt:
    ...
    Performing configuration task 3 of 4
    Upgrading SharePoint Products...
    Failed to upgrade SharePoint Products.
    An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20140102-075746-95 was updated by [FarmAdministrationAccount], in the PSCONFIG (736) process, on machine [WFE2]. View the tracing log for more information about the conflict.
    ....
  10. Reviewed Upgrade Status in Central Administration.  Showed as Failed.
  11. Performed stsadm -o setproperty -pn command-line-upgrade-running -pv No on WFE2, per reference [2], under the sharepoint farm administration account.  This operation completed successfully.
  12. Performed psconfig -cmd secureresources on WFE2 again, followed by IISRESET, under the farm administration account.  Failed with same error as previously.
  13. Reviewed Upgrade Status in Central Administration. Showed as Failed.
  14. Performed psconfig -cmd upgrade -inplace b2b -wait -force on WFE2, under the farm administration account. This failed again, but it failed at a point further along the upgrade process:
    ...
    Performing configuration task 3 of 4
    Upgrading SharePoint Products...
    100.00%
    Failed to upgrade SharePoint Products.
    An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Upgrade completed with errors. Review the upgrade log file located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\Upgrade-20140102-081022-697.log. The number of errors and warnings is listed at the end of the upgrade log file.
    ...
  15. Reviewed the log file indicated in the error message and found the following:
    ...
    [PSCONFIG] [SPUpgradeSession] [ERROR] [1/2/2014 8:11:06 AM]: CanUpgrade [SecureStoreServiceDatabase Name=SecureStoreDatabaseName] failed.
    [PSCONFIG] [SPUpgradeSession] [ERROR] [1/2/2014 8:11:06 AM]: Exception: Cannot open database "SecureStoreDatabaseName" requested by the login. The login failed.
    Login failed for user 'FarmAdministrationAccount'.
    ...
  16. Reviewed the SecureStore database logins and found that the farm service account was not mapped to this database. Mapped the farm service account as DBO to this database.
    This database had been created using the manual PowerShell method for creating the service application.  Apparently, this method did not grant the farm administration account any permissions to the database.  Checking other service application databases found the same.  Conclusion: the upgrade, while run under the farm administration account, could not be completed because this account did not have permission to update this particular database.
  17. Performed psconfig -cmd upgrade -inplace b2b -wait -force on WFE2, under the farm administration account. This time, successful.
  18. Reviewed Upgrade Status in Central Administration. Showed as Succeeded.
  19. On workstation, opened new browser and connected to farm site collection.  This time no error.
Lessons Learned

May not have performed Psconfig on WFE2 during installation of WFE2.

References
  1. The trial period for this product has expired. Trial Period? WTH?
  2. Configuration wizard failed “An update conflict has occurred, and you must re-try this action.”
  3. Share Point- The trial period for this product has expired
  4. the trial period for this product has expired. sharepoint foundation 2010
  5. Psconfig command-line reference (SharePoint Server 2010)
  6. SharePoint 2010: The trial period for this product has expired