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 an 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:
 
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 
 
Step 1 - Works with around 70-80% success
  1. 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.

  2. Upgrade the SharePoint farm

    PSConfig.exe -cmd upgrade -inplace b2b -wait –force
Step 2 - When 20% fails
 
While executing above commands, you might get this error
 
Add -cmd installcheck –noinstallcheck parameters.
 
FIX
 
So execute these commands as follows:
  1. stsadm -o setproperty -pn command-line-upgrade-running -pv No
  2. PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck -noinstallcheck
Step 3
 
You might get this error after executing above commands:
  1. stsadm -o setproperty -pn command-line-upgrade-running -pv No
  2. 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, trial 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:
  1. stsadm -o setproperty -pn command-line-upgrade-running -pv Yes
  2. PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck
Patching was successful.
 
Step 4
 
You might get this error after executing following commands:
  1. stsadm -o setproperty -pn command-line-upgrade-running -pv No
  2. 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:
  1. stsadm -o setproperty -pn command-line-upgrade-running -pv No
  2. PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck