Build to Build (B2B) Upgrade of the SharePoint environment – Part 2

In this post, we will discuss few troubleshooting techniques when the upgrade fails to complete.

The first tool you have in hand is the upgrade.log file. When we run the Configuration Wizard, a file called upgrade.log file will be created, by default in the path C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS\

As a tip, always make sure you rename the previous upgrade.log file to something so that it creates a new one. Otherwise, it will append to the existing file, making it huge and not very convenient to search for errors.

If the upgrade fails, search for the errors or exceptions in the upgrade.log file. This should give us an idea on what the problem is and the troubleshooting steps will depend on it. We could then use the well known search engines like BING and search for the error and exceptions that we see.

Some of the basic and common issues and possible solutions are listed in KB 944267. Please go through and see if it matches with the error/scenario you have come across. https://support.microsoft.com/?id=944267

I am listing more scenarios and the possible solution here:

1.
Behavior/Symptoms:
===================
The Configuration Wizard Fails at step 8 with the following message:

"Failed to start service SPSearchServiceInstance on this server after completing upgrade. Please start it manually"

In the Upgarde.log file, you may see one of the following errors:

[SPManager] [ERROR] [7/6/2009 5:57:56 PM]: Upgrade [SPSearchDatabase Name=WSS_Search_SPWEB Parent=SPDatabaseServiceInstance] failed.
[SPManager] [ERROR] [7/6/2009 5:57:56 PM]: The service did not start due to a logon failure

Resolution:
===========
The logon username and password may be out of sync (If the password has changed) for the Service Account of the Windows SharePoint Services Search Service.

Go to Central Administration Site -> Services on Server -> Windows SharePoint Services Search, and reset the password for the user.
From the windows services panel, restart the Windows SharePoint Services Search service.

Re-run the configuration wizard by running the following the command

psconfig -cmd upgrade -inplace b2b -force

Additional Note: Refer the KB 934838 to learn how to update the service accounts and passwords for SharePoint.

 

2.
Behavior/Symptoms:
=================
The Configuration Wizard Fails with the following message:

"Value cannot be null." Parameter name: connectionString

Resolution:
===========
Check if the following registry key exists in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDB

"dsn"="<connection string goes here....>"

If dsn doesn't exist, then we can add it manually as a work around and re-run the Configuration Wizard using the following command:

psconfig -cmd upgrade -inplace b2b -wait -force

Below is a sample that can be added.

"dsn" = "Data Source=<db server name>;Initial Catalog=<config db name>;Integrated Security=;Enlist=False"

However, this is just a quick work around step. If registry keys related to SharePoint are missing, we cannot really say if this is the only key missing and how many places has it been tampered. So, the best approach is to disconnecting the machine from the farm and then re-adding it back using the Configuration Wizard.

Important Note: Serious problems might occur if you modify the registry incorrectly. Therefore, please make sure that you back up the registry before you modify it. Then, you can restore the registry if a problem occurs.

 

3.
Behavior/Symptoms:
=================
The Configuration Wizard Fails with the following message in the PSCDiagnostics log file:
 
Failed to secure the SharePoint resources.

An exception of type System.ArgumentException was thrown. Additional exception information: Cannot apply security settings to resource

C:\WINDOWS\System32\drivers\etc\HOSTS as it does not exist.

System.ArgumentException: Cannot apply security settings to resource

C:\WINDOWS\System32\drivers\etc\HOSTS as it does not exist.
at
Microsoft.SharePoint.PostSetupConfiguration.ResourceAccess.ValidateResourceName(Stri
ng name)
at Microsoft.SharePoint.PostSetupConfiguration.ResourceAccess..ctor(String
resourceType, String resourceName, Int32 securityGroup, String permissions)
at Microsoft.SharePoint.PostSetupConfiguration.SecurityTask.SecureResources()
at Microsoft.SharePoint.PostSetupConfiguration.SecurityTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Resolution:
===========
This is pretty straight forward error message and the HOSTS file will be missing from "C:\WINDOWS\System32\drivers\etc\".
We can simply copy a HOSTS file from another machine from the path "C:\WINDOWS\System32\drivers\etc\" and change or add the entries as needed and then re-run the command to perform the upgrade.

 

4.
Behavior/Symptoms:
=================
The Configuration Wizard Fails at step 4 with the following message:

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 DiagnosticsService Parent=SPFarm
Name=<config DB> is being updated by Domain\User, in the w3wp process, on machine <machine name>. 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 DiagnosticsService Parent=SPFarm Name=<config DB> is being updated by Domain\User, in the w3wp process, on machine <machine name>. View the tracing log for more information about the conflict.
 

Resolution:
===========
Clear the config cache. Refer KB 939308 for the steps for clearing the cache.ini

Re-run the following command to perform the upgrade:

psconfig -cmd upgrade -inplace -b2b -force -wait

 

5.
Behavior/Symptoms:
==================
The Configuration Wizard Fails with the following message:

Failed to upgrade SharePoint Products and Technologies

An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.

Additional exception information: Failed to upgrade SharePoint Products and Technologies.

Observed following error message from the upgrade.log file.

 

[SPIisWebSiteWssSequence] [ERROR] [7/10/2009 10:19:58 PM]: Action 3.1.3.0 of Microsoft.SharePoint.Upgrade.SPIisWebSiteWssSequence failed.
[SPIisWebSiteWssSequence] [ERROR] [7/10/2009 10:19:58 PM]: The system cannot find the path specified.
[SPIisWebSiteWssSequence] [ERROR] [7/10/2009 10:19:58 PM]: at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)

at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.PropertyValueCollection.PopulateList()
at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry,
String propertyName)
at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
at Microsoft.SharePoint.Administration.SPIisApplicationPool.get_PeriodicRestartMemory()
at Microsoft.SharePoint.Administration.SPProvisioningAssistant.EnableMemoryBasedAppPoolRecycling(SPIisApplicationPool local)
at Microsoft.SharePoint.Administration.SPProvisioningAssistant.EnableMemoryBasedAppPoolRecycling(String applicationPoolId)
at Microsoft.SharePoint.Upgrade.EnableMemoryBasedAppPoolRecycling.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

Resolution:
=========
Check if the Application Pools are missing in the IIS manager or if the SharePoint Sites are pointed manually to different application Pools. The system administrators might have changed the application pools of the web application as part of the administration tasks.

Note: Since SharePoint stores the Web Application and Application pool settings in its configuration database, Change or deleting the Application pool manually from IIS manager leaves orphan entries in the configuration database. This could impact (For example, the above upgrade issue) later while SharePoint looks into IIS metabase for the Application pools. We can use the SPS Farm reports to view the list of all Web Applications and their associated application pools. The SharePoint Central Administration site doesn't provide any UI to change or delete the application pools.

There is couple of ways to handle the situation.

1. Create/Modify the Application pools manually in IIS manager to bring everything back to how it was before someone changed it. This could be tedious if there are too many.

OR

2. We can delete the web application (Of course, WITHOUT deleting the content DB) in question and re-create it and attach the existing content DB. This will clear the orphan entry.

OR

3. Stop and restart the "Windows SharePoint Services Web Application" service on the WFE. This step will remove and recreate all the application pools and web applications on that WFE, including the missing ones as per what is present in SharePoint configuration datbase.

Imp Note: Make sure you backup the IIS Metabase before trying the above step.

4. Use the object model to programmatically change the web application's associations with the Application pools.
My colleague Vijay has a good blog post on this option. Please refer it for the details and the sample code.

Change the application pool associated with a web application in SharePoint.
https://blogs.msdn.com/vijgang/archive/2009/07/21/change-the-application-pool-associated-with-a-web-application-in-sharepoint.aspx

And then re-run the following command to perform the upgrade:

psconfig -cmd upgrade -inplace -b2b -force -wait

Hope this helps!

In the Part 3 of this blog, I will discuss some more tips and issues on the same topic. Continue to have fun :)