SOLVED

SharePoint 2019 Unable to create site collections after installing Aug 2021 CU

Copper Contributor

I installed the Aug 2021 CU to both my Dev and PreProd environments.  In my PreProd environment I can no longer create a site collection.  It works fine in Dev.  The ULS log is showing these errors.

 

Exception from site settings manager. Using default value. Key: 'EveryoneClaimEnabled', Default: 'True', Exception 'System.ArgumentNullException: Value cannot be null. Parameter name: siteSubscription
at Microsoft.SharePoint.SPSiteSubscriptionSettings.GetSettings(SPSiteSubscription siteSubscription)
at Microsoft.SharePoint.Administration.Claims.SPAllUserClaimProvider.GetClaimVisibilitySetting(String siteSubscriptionKey, SPSiteSubscription siteSubscription, Boolean defaultValue)'.

 

System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(IEnumerable`1 contentDatabases, Guid siteIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom)
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters, Guid siteIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom)
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters)
at Microsoft.SharePoint.Administration.SPSiteCollection.GetContentDatabaseForSiteCreation(SPSiteSubscription siteSubscription, Boolean useHostHeaderAsSiteName, Uri siteUri)
at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)
at Microsoft.SharePoint.ApplicationPages.CreateSitePage.BtnCreateSite_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Anyone else having this issue?

6 Replies
I'm having the same issue where I can create site collections (same type of error as you posted) with one of the SharePoint 2019 farm for a client, but the farm wasn't patched recently. It's patch level is 16.0.10363.12107 (July 2020 CU). The issue seems to have started recently. Did you find a resolution to this issue in your environment?
I currently have a MS Support case open. Still waiting to be contacted by the SP team.
Thanks David for the quick reply. I'm about to do the same and open an MS Support case. Please keep us posted if you find a resolution!
best response confirmed by David-Haver (Copper Contributor)
Solution

Hi @David-Haver 

 

With the help of Microsoft Support, we resolved the issue in our environment. I'm not sure if the same root cause will apply to yours, but what we found is the SharePoint_Config database had a reference to a missing Content Database. This caused process to create the site collection to fail using both the Central Admin UI and PowerShell. I did notice however that explicitly setting the target content databases for the site collection did work.

 

## Succeeded
New-SPSite -Url https://portal.domain.com/sites/ccotetest -Template "STS#3" -Name "ccotetest" -OwnerAlias "domain\ccote" -ContentDatabase "Portal_Content_01"

 

## Failed - New-SPSite : Object reference not set to an instance of an object.
New-SPSite -Url https://portal.domain.com/sites/ccotetest1 -Template "STS#3" -Name "ccotetest1" -OwnerAlias "domain\ccote"


Resolution: With the help of Microsoft Support

1) Get the SharePoint Web Application ID for the web application where you can create new site collections:
Add-PSSnapin Microsoft.SharePoint.PowerShell
get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"} | fl

 

You retrieve the Application ID - example: 4a23e792-6701-41e8-89f7-00c4eaefddce

 

2) Run the following Query on the SQL Server - where the ID is of the Web Application:

*** Important: You do require a Microsoft Support Case to run any SQL queries to be supported under the service agreement. Running queries on SQL SharePoint databases voids your support otherwise.  Always have Microsoft Support approve running SQL queries against your environment. ***


use [SharePoint_Config]
select ID, Name, CAST (properties as xml) from Objects where ID = '4a23e792-6701-41e8-89f7-00c4eaefddce'
go

 

Locate the orphaned Content Database record from the XML output - Microsoft Support can help you to locate the orphaned database with the output file.

 

3) Using PowerShell, remove the orphan entry from the configuration:
$wa = get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"}
$wa.contentdatabases.delete('guid-of-the-orphan-content-database')


I hope this helps!

 

Regards,
Charles

@ccotegu 

 

This resolved my issue in my 2019 Production environment but not in my 2019 Dev/Test environment. Thanks for posting this is great detail so I could just follow along and remove the orphan.

1 best response

Accepted Solutions
best response confirmed by David-Haver (Copper Contributor)
Solution

Hi @David-Haver 

 

With the help of Microsoft Support, we resolved the issue in our environment. I'm not sure if the same root cause will apply to yours, but what we found is the SharePoint_Config database had a reference to a missing Content Database. This caused process to create the site collection to fail using both the Central Admin UI and PowerShell. I did notice however that explicitly setting the target content databases for the site collection did work.

 

## Succeeded
New-SPSite -Url https://portal.domain.com/sites/ccotetest -Template "STS#3" -Name "ccotetest" -OwnerAlias "domain\ccote" -ContentDatabase "Portal_Content_01"

 

## Failed - New-SPSite : Object reference not set to an instance of an object.
New-SPSite -Url https://portal.domain.com/sites/ccotetest1 -Template "STS#3" -Name "ccotetest1" -OwnerAlias "domain\ccote"


Resolution: With the help of Microsoft Support

1) Get the SharePoint Web Application ID for the web application where you can create new site collections:
Add-PSSnapin Microsoft.SharePoint.PowerShell
get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"} | fl

 

You retrieve the Application ID - example: 4a23e792-6701-41e8-89f7-00c4eaefddce

 

2) Run the following Query on the SQL Server - where the ID is of the Web Application:

*** Important: You do require a Microsoft Support Case to run any SQL queries to be supported under the service agreement. Running queries on SQL SharePoint databases voids your support otherwise.  Always have Microsoft Support approve running SQL queries against your environment. ***


use [SharePoint_Config]
select ID, Name, CAST (properties as xml) from Objects where ID = '4a23e792-6701-41e8-89f7-00c4eaefddce'
go

 

Locate the orphaned Content Database record from the XML output - Microsoft Support can help you to locate the orphaned database with the output file.

 

3) Using PowerShell, remove the orphan entry from the configuration:
$wa = get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"}
$wa.contentdatabases.delete('guid-of-the-orphan-content-database')


I hope this helps!

 

Regards,
Charles

View solution in original post