Monday, March 14, 2016

Timer job keep on stopping, SharePoint Designer Cannot perform this operation. The file is no longer checked out or has been deleted.

Hi All,

Many times SharePoint start behaving weirdly due to different aspects of SharePoint as follows:

1.       Timer job keep on stopping every few minutes.

2.       SharePoint Designer 2010 and SharePoint Designer 2013 gives error “Cannot perform this operation. The file is no longer checked out or has been deleted.”

3.       SharePoint Search Service application gives error.


Why SharePoint Configuration cache for important for SharePoint?
The SharePoint Configuration cache exists on EACH SharePoint server irrespective of SharePoint such as Application server, Web server or Search server. The cache exist on each server.

It basically, the SharePoint Configuration cache is exits on C:\ProgramData\Microsoft\SharePoint\Config\



Please note ProgramData is hidden folder and you need to enable the folder view.  The cache folder has many XML files and a single cache.ini file. The XML file are fundamentally farm objects and they come from SharePoint configuration database in the Objects table within SQL Server.

For an instance, XML file  8cc b296-daa7-fdbd-00fc-0b5adf69b794.xml within the cache folder is search job and has mapping in SharePoint Configuration database. The primary file is the cache.ini and MUST exist on each server. Furthermore, it must have a number value within it. It could be 1 or higher.    At times, while upgrading a SharePoint patch you encounter a Concurrency Update exceptions and here the issue happens. Trevor has explained in detail about it beautifully.   

Fix:

1.       Use the Codeplex solution SPCacheCleaner
2.       Or follow the below steps on each SharePoint server.  
a.       STOP the timer service
Run >> Services.msc >> SharePoint Timer Service >> Stop

b.       Navigate to the C:\ProgramData\Microsoft\SharePoint\Config\<GUID>
c.       Delete all the XML files within this directory.
NOTE: Delete ONLY THE XML FILES.  And NOT the Cache.ini file.

d.      Open the cache.ini file and reset the value to 1.
e.      Save and close the file.
f.        Restart the SharePoint time service for all SharePoint Servers.

3.       Clear SharePoint Designer

Error:
Cannot perform this operation. The file is no longer checked out or has been deleted
Problem: SharePoint Designer is out of sync. And we need to rebuild the cache.

FIX:
a.       Navigate to the following folders:
%APPDATA%\Microsoft\Web Server Extensions\Cache and
%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

b.      Delete the all the files



References:

1.       Trevor Seward blog

2.       Codeplex to clean the SharePoint configuration file

4.       Clear SharePoint Designer 

Sunday, March 6, 2016

SharePoint patching, issues, troubleshooting and solutions

While working for SharePoint patches could be a difficult task. Specially, error logs could be very misleading and much more to comprehend to troubleshoot.

These are my experience with patching in different scenarios.
Stefan Gobner (Senior Escalation Engineer for SharePoint) prefers the Wizard based patching i.e. PSCONFIGUI.EXE instead of PowerShell way to patch i.e. PSCONFIG.EXE

Basically, PSCONFIGUI.EXE performs several tasks one after another while installing SharePoint updates.  Whereas, PowerShell using PSCONFIG.EXE gives more control with respect to overall tasks that are excited and thereby FASTER than UI based.

The most common PowerShell to upgrade is as follows:
PSCONFIG -cmd upgrade -inplace b2b –wait

However, at few instances you have to add additional parameter and will NOT update the files in the _app_bin directory of the web applications.
PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources


These are the list of operations using   PSCONFIG.EXE in Yellow color:

 Usage:
psconfig.exe -cmd <Command> [Parameters]
psconfig.exe -help [Command]
psconfig.exe -?
Commands:
Setup
standaloneconfig
configdb
helpcollections
secureresources
services
installfeatures

adminvs
upgrade
evalprovision
applicationcontent
quiet



Step1: Works with around 70-80% success

a) Locks the farm for upgrade
stsadm -o setproperty -pn command-line-upgrade-running -pv No

Note
: At times, the command might fail. Run the command again and it will work.

b) Upgrade the SharePoint farm
PSConfig.exe -cmd upgrade -inplace b2b -wait –force

Step2: When 20% fails:

While executing above commands, you might get this error

Add -cmd installcheck –noinstallcheck parameters.

FIX:
So execute these commands as follows:
a)  stsadm -o setproperty -pn command-line-upgrade-running -pv No
b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck -noinstallcheck


Step3:

You might get this error after executing above commands:
a) stsadm -o setproperty -pn command-line-upgrade-running -pv No
b) PSConfig.exe -cmd upgrade -inplace b2b -wait –force

An exception of type System.DirectoryServices.DirectoryServicesCOMException was thrown.  Additional exception information: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

As usual the error message are confusing.  After a lot of research, tail and error in my development environment.

NOTE: All environments are different environments and depends on current SharePoint patch level, SQL Server patch level etc.

FIX:
Ensure following servers have been STARTED across all the SharePoint servers:
·         IISAdmin service
·         SharePoint Timer service
·         SharePoint Admin service
·         WWW Publishing service
Run the following commands:

a) stsadm -o setproperty -pn command-line-upgrade-running -pv Yes
b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck


Patching was successful.

Step4:
You might get this error after executing following commands:
a) stsadm -o setproperty -pn command-line-upgrade-running -pv No
b) PSConfig.exe -cmd upgrade -inplace b2b -wait –force


Unable to create a Service Connection Point in the current Active Directory domain. Verify that the SharePoint container exists in the current domain and that you have rights to write to it.
Microsoft.SharePoint.SPException: The object LDAP://CN=Microsoft SharePoint Products,CN=System,DC=contoso,DC=.east,DC=com doesn't exist in the directory
at Microsoft.SharePoint.Administration.SPServiceConnectionPoint.Ensure(String serviceBindingInformation)
at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()


After checking with the Active Directory admin, there is NO entry for Microsoft SharePoint Products. Obliviously, the error message thrown is misleading.

FIX:
Ensure following servers have been STARTED across all the SharePoint servers:
·         IISAdmin service
·         SharePoint Timer service
·         SharePoint Admin service
·         WWW Publishing service
Run the following commands:
a) stsadm -o setproperty -pn command-line-upgrade-running -pv No
b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck

Reference:


Low Code Reimagined with AI + Copilot Pitch Deck - Copy Copilot day (Virtual) - 2023

 Hi All,  I presneded a session at Pune UG on Low Code Reimagined with AI + Copilot Pitch Deck.  Video is at this address  https://www.youtu...