SharePointDsc: Can't create Site Collection in SharePoint 2019
Details of the scenario you tried and the problem that is occurring
When using SharePointDSC to create a Custom minrole server using the Azure SharePoint 2019 image it throws an error for every Site Collection I try to create. New-SPSite works normally outside of DSC. Site Collections with the same settings can be built using New-SPSite in PowerShell or Central Admin
Verbose logs showing the problem
VERBOSE: [2018-11-29 14:11:35Z] [VERBOSE] [SPT019]:
[[SPSite]TeamSite] Performing the operation “New-SPSite” on target
“http://Portal2019.Actualdomainname.com”.
VERBOSE: [2018-11-29 14:11:58Z] [ERROR] Invalid field name.
{cbb92da4-fd46-4c7d-af6c-3128c2a5576e} http://portal2019.Actualdomainname.com
Suggested solution to the issue
This works fine in SharePoint 2013 and 2016. It only happens in 2019
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SPWebApplication SharePointSites
{
Name = "SharePoint Sites"
ApplicationPool = $WebAppPoolName
ApplicationPoolAccount = $WebPoolManagedAccountCreds.UserName
AllowAnonymous = $false
DatabaseName = "SP$($ReleaseYear)_Sites_Content"
WebAppUrl = $PortalUrl
Port = 80
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPFarm]CreateSPFarm"
}
SPWebApplication OneDriveSites
{
Name = "OneDrive"
ApplicationPool = $webAppPoolName
ApplicationPoolAccount = $WebPoolManagedAccountCreds.UserName
AllowAnonymous = $false
DatabaseName = "SP$($ReleaseYear)_Sites_OneDrive"
HostHeader = "OneDrive$($ReleaseYear).$($AdDomainName)"
WebAppUrl = $OneDriveUrl
Port = 80
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPFarm]CreateSPFarm"
}
SPCacheAccounts WebAppCacheAccounts
{
WebAppUrl = "http://Portal$($ReleaseYear).$($AdDomainName)"
SuperUserAlias = "$DomainNetbiosName\$SuperUserAlias"
SuperReaderAlias = "$DomainNetbiosName\$SuperReaderAlias"
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPWebApplication]SharePointSites"
}
SPCacheAccounts OneDriveCacheAccounts
{
WebAppUrl = "http://oneDrive$($ReleaseYear).$($AdDomainName)"
SuperUserAlias = "$DomainNetbiosName\$SuperUserAlias"
SuperReaderAlias = "$DomainNetbiosName\$SuperReaderAlias"
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPWebApplication]OneDriveSites"
}
SPSite TeamSite
{
Url = $PortalUrl
OwnerAlias = "$($DomainNetbiosName)\$($SharePointSetupUserName)"
Name = "Root Demo Site"
Template = "STS#0"
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPCacheAccounts]WebAppCacheAccounts"
}
SPSite MySiteHost
{
Url = $OneDriveUrl
OwnerAlias = "$($DomainNetbiosName)\$($SharePointSetupUserName)"
Name = "OneDrive"
Template = "SPSMSITEHOST#0"
PsDscRunAsCredential = $SharePointSetupUserAccountcreds
DependsOn = "[SPCacheAccounts]OneDriveCacheAccounts"
}
}
The operating system the target node is running
Version of SharePoint that is used (e.g. SharePoint 2016)
SharePoint 2019
Version and build of PowerShell the target node is running
Version of the DSC module that was used (‘dev’ if using current dev branch)
SharePoint DSC 3.0.0.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 43 (26 by maintainers)
Commits related to this issue
- Force a reboot before creating site in SharePoint 2019 to workaround bug https://github.com/PowerShell/SharePointDsc/issues/990 — committed to Yvand/AzureRM-Templates by Yvand 5 years ago
- Force a reboot before creating site in SharePoint 2019 to workaround bug https://github.com/PowerShell/SharePointDsc/issues/990 — committed to Yvand/azure-devtestlab by Yvand 5 years ago
- New ARM template to deploy SharePoint 2013/2016/2019 (#430) * Add SharePoint template * Remove unnecessary content * Update documentation * Delete Deploy-AzureResourceGroup.ps1 * Update all DSC m... — committed to Azure/azure-devtestlab by Yvand 5 years ago
- Update SharePoint templates (#23) * Add logging on failure * Properly enable TLS 1.2 for SharePoint 2013 * Configure TLS 1.2 for all SharePoint VMs * Set relying party identifier to "urn:fed... — committed to Yvand/AzureRM-Templates by Yvand 5 years ago
- Fixed #990 and added logging to SPSearchServiceApp — committed to ykuijs/SharePointDsc by ykuijs 3 years ago
- Merge pull request #1342 from ykuijs/bugfix Fixed #990 and added logging to SPSearchServiceApp — committed to dsccommunity/SharePointDsc by ykuijs 3 years ago
i’m not aware of any work to fix it - it may have already been done - it’s not something I’ve looked at in a while, but was pointed to this page when it came up related to something else. the bottom line - the problem is/was SharePoint, not anyone else’s tool/automation choice or implementation
Hi folks,
It’s worth noting this isn’t a specific issue with DSC or any other approach. It impacts every use of New-SPSite within a PoSh automation approach, and was a bug during pre-release and RTM builds. on any farm type. in some cases, reloading the snapin will allow the site creation. other times the entire process needs to be reloaded
@NikCharlebois - I just finished running the test you provided and I also get the same error message that you get.
New-SPWebApplication : An update conflict has occurred, and you must re-try this action. The object SPWebApplication Name=SharePoint - 90 was updated by acmeman\SP_Farm, in the OWSTIMER (4988) process, on machine SPT01. View the tracing log for more information about the conflict. At C:\DSC\NickTest.ps1:43 char:1
Issue will be fixed in v4.8, which will be released later today.
@ykuijs let me know if you want additional testers, I’ll be happy to do that
FYI: We found a workaround for this issue, which I am in the process of testing.
So I’ve found a workaround that seems to fix the problem for DSC. I’m using xPendingReboot to insert a Reboot between creating the Web Applications and creating new site collections. That either helps get the files registered that creating sites needs or simply the delay involved is enough to fix the timing problem. Either way it works. Here’s the code I used.