0

I am trying to create a new SharePoint 2019 farm.

After I run the SharePoint 2019 Products Configuration Wizard, the procedure fails in Step 3 with the Exception System.InvalidOperationException: The security token service is not available in the farm.

In error log the trace is as follows:

06/01/2023 17:37:21  9  INF                              Creating connection string for config db SharePoint_Config server ath-spdevsql
06/01/2023 17:37:21  9  INF                              Creating connection string for admin content db SharePoint_AdminContent_157622b7-12bc-4831-bd0c-eec258dedec1 server spdevsql
06/01/2023 17:37:21  9  INF                              Using NTLM for sql connection string
06/01/2023 17:37:21  9  INF                              Creating a new farm with config db SharePoint_Config content db SharePoint_AdminContent_157622b7-12bc-4831-bd0c-eec258dedec1 server spdevsql for farm mode
06/01/2023 17:39:12  9  ERR                              Task configdb has failed with an unknown exception 
06/01/2023 17:39:12  9  ERR                              Exception: System.InvalidOperationException: The security token service is not available in the farm.
   at Microsoft.SharePoint.Administration.Claims.SPSecurityTokenService.get_Local()
   at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.get_Local()
   at Microsoft.SharePoint.Administration.Claims.SPClaimProviderOperations.EntityTypes(Uri context, SPClaimProviderOperationOptions mode, String[] providerNames)
   at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.GetEntityTypesForSecurityGroupPrincipalType(Uri contextUri, SPClaimProviderOperationOptions mode)
   at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.ConvertFromPrincipalType(Uri contextUri, SPPrincipalType principalType)
   at Microsoft.SharePoint.Utilities.SPUtility.SPPrincipalEntityType..ctor(SPPrincipalType scopes, SPPrincipalSource sources, SPWeb web, SPWebApplication webApplication, Nullable`1 urlZone)
   at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver)
   at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipal(SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, Boolean inputIsEmailOnly)
   at Microsoft.SharePoint.Administration.SPSiteCollection.ResolvePrincipalForSiteCreation(Uri siteUri, Uri siteHostUri, String loginName, Boolean& isWindowsLegacyAccount, String& userKey)
   at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)
   at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)
   at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)
   at Microsoft.SharePoint.Administration.SPFarmFactory.CreateAdministrationWebService(SPFarm farm, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)
   at Microsoft.SharePoint.Administration.SPFarmFactory.CreateBasicServices(SPFarm farm)
   at Microsoft.SharePoint.Administration.SPFarmFactory.Create()
   at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, SqlConnectionStringBuilder siteMapDatabase, SqlConnectionStringBuilder timerServiceDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)
   at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()
   at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

I run the Configuration Wizard with SPAdmin domain account, which is a local Administrator on SharePoint Server and has dbcreator, securityadmin and serveradmin roles in SQL Server.

When I check the status of the configuation, in SQL Server, SharePoint_Config and SharePoint_AdminContent databases have been created but in IIS, no web application have been created.

This is the message in the Configuration Wizard enter image description here

2 Answers 2

1

Please check again your permission on SQL and server where are you initialize SP Farm. Because as I see you DB for Central Administration created failed and Task configdb has failed with an unknown exception and than broken because all depend services not provisioned. Check all permission with MSDN requirement and then clean all broken DBs and try again.

0

You are right @VictorBuzin, SharePoint_Config database has been created but data in the tables are missing. For example "SecurityTokenService" record from SharePoint_Config.dbo.Objects table is missing. (SharePoint_Config.dbo.Objects.Name='SecurityTokenService')

Maybe the exception message that breaks the configuration procedure is related to this Security Token Service record.

When I checked other SharePoint log files with the traces of the Configuration Wizard execution, I found out that a few lines before the SecurityTokenService exception, there is an error related to Active Directory.

Error when trying to get trusted forests and domains. Exception message: The user name or password is incorrect.  , callstack:    at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)     at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)     at Microsoft.SharePoint.Utilities.SPUserUtility.GetTrustedDomains(List`1 trustedForestNames, List`1 trustedDomainNames)  
Found 0 trusted forests
Found 0 trusted domains
SearchFromGC name = mydomain.com. Error Message: The user name or password is incorrect.     
Exception when search SID "0x010500000000000515000000EC5FE65F86706E04E02763009A510000" from AD "mydomain.com". Exception=The user name or password is incorrect.

This SID is the SID of the Account MyDomain\SPAdmin

This is the part of the log file.

06/03/2023 20:33:43.82  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           General                         8l26    High        Error when trying to get trusted forests and domains. Exception message: The user name or password is incorrect.  , callstack:    at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)     at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)     at Microsoft.SharePoint.Utilities.SPUserUtility.GetTrustedDomains(List`1 trustedForestNames, List`1 trustedDomainNames)  
06/03/2023 20:33:43.82  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           General                         72dz    Medium      Found 0 trusted forests .    
06/03/2023 20:33:43.82  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           General                         72e0    Medium      Found 0 trusted domains      
06/03/2023 20:33:43.83  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Performance                     ftq3    Medium      SearchFromGC name = mydomain.com. Error Message: The user name or password is incorrect.     
06/03/2023 20:33:43.83  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Web Controls                    88wj    Medium      Exception when search SID "0x010500000000000515000000EC5FE65F86706E04E02763009A510000" from AD "mydomain.com". Exception=The user name or password is incorrect.     
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bfj9a   Medium      Entering Monitored Scope (Fetch collection from DB). Parent=Creating SPSite: Title:[$Resources:core,nav_CentralAdministrationHome;];CreateFromSiteMaster:False;EffectiveCreateFromSiteMaster:False;CreatingSiteMaster:False;Template:CENTRALADMIN;BatchTableCopy:False;Description:NULL  
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bfj9a   Medium      Leaving Monitored Scope: (Fetch collection from DB) Execution Time=0.9419; CPU Milliseconds=0; SQL Query Count=1; Parent=Creating SPSite: Title:[$Resources:core,nav_CentralAdministrationHome;];CreateFromSiteMaster:False;EffectiveCreateFromSiteMaster:False;CreatingSiteMaster:False;Template:CENTRALADMIN;BatchTableCopy:False;Description:NULL     
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bem8s   Medium      SPPersistedObjectCollectionCache.FetchObjectCollectionFromDatabase: Parameters collectionType=Children, collectionParentId=0feca8a0-e9f6-436a-a491-172c23d6e5a1, objectTypeGuid=[9920f486-2ff4-4d10-9532-e01979826585][Microsoft.SharePoint.Administration.SPAlternateUrlCollection], Object Count=1, FailedLastRefresh=False    at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.FetchObjectCollectionFromDatabase(SPConfigurationDatabase configDb, SPPersistedObjectCollectionType collectionType, Guid collectionParentId, Guid objectTypeGuid)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get(SPPersistedObject collectionParentObject, SPPersistedObjectCollectionType collectionType, Type collectionMemberType, Boolean checkInMemoryCache, Boolean checkFileSystemCache, Boolean checkDatabase, Boolean updateMemoryCache, Boolean returnEmptyCollection)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get[T](SPPersistedObjectCollection`1 collection, Boolean checkInMemoryCache, Boolean checkFileSystemCache, Boolean checkDatabase, Boolean updateMemoryCache)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get[T](SPPersistedObjectCollection`1 collection)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetBackingList[U](SPPersistedObjectCollection`1 persistedCollection)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.get_BackingList()     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.<GetEnumeratorImpl>d__0.MoveNext()     at Microsoft.SharePoint.Administration.SPAlternateUrlCollectionManager.LookupAlternateUrl(Uri canonicalRequestUri)     at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(SPFarm farm, Uri requestUri, Boolean swapSchemeForPathBasedSites, Boolean fallbackToHttpContext, Boolean skipFillFileSystemCache, SPAlternateUrl& alternateUrl, ISPSiteLookupInfo& hostHeaderSiteInfo, Boolean& lookupR...   
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bem8s   Medium      ...equiredContext)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetWebApplicationAndZoneForContext(Uri context, SPWebApplication& webApplication, Nullable`1& zone)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.GetEntityTypesForSecurityGroupPrincipalType(Uri contextUri, SPClaimProviderOperationOptions mode)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.ConvertFromPrincipalType(Uri contextUri, SPPrincipalType principalType)     at Microsoft.SharePoint.Utilities.SPUtility.SPPrincipalEntityType..ctor(SPPrincipalType scopes, SPPrincipalSource sources, SPWeb web, SPWebApplication webApplication, Nullable`1 urlZone)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipal(SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, Boolean inputIsEmailOnly)     at Microsoft.SharePoint.Administration.SPSiteCollection.ResolvePrincipalForSiteCreation(Uri siteUri, Uri siteHostUri, String loginName, Boolean& isWindowsLegacyAccount, String& userKey)     at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateAdministrationWebService(SPFarm farm, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString far...    
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bem8s   Medium      ...mPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateBasicServices(SPFarm farm)     at Microsoft.SharePoint.Administration.SPFarmFactory.Create()     at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, SqlConnectionStringBuilder siteMapDatabase, SqlConnectionStringBuilder timerServiceDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()     at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)     at System.Threading.ThreadHelper.ThreadStart()     
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config Cache                    be3wh   Medium      SPPersistedObjectCollectionCache: file and DB match for 9920f486-2ff4-4d10-9532-e01979826585_0feca8a0-e9f6-436a-a491-172c23d6e5a1_Children.rsv.  
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       azcxo   Medium      SPPersistedObjectCollectionCache: Missed memory and file cache, falling back to SQL query. CollectionType=Children, ObjectType=Microsoft.SharePoint.Administration.SPAlternateUrlCollection, CollectionParentId=0feca8a0-e9f6-436a-a491-172c23d6e5a1, Object Count=1, Stack=   at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get(SPPersistedObject collectionParentObject, SPPersistedObjectCollectionType collectionType, Type collectionMemberType, Boolean checkInMemoryCache, Boolean checkFileSystemCache, Boolean checkDatabase, Boolean updateMemoryCache, Boolean returnEmptyCollection)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get[T](SPPersistedObjectCollection`1 collection, Boolean checkInMemoryCache, Boolean checkFileSystemCache, Boolean checkDatabase, Boolean updateMemoryCache)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollectionCache.Get[T](SPPersistedObjectCollection`1 collection)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetBackingList[U](SPPersistedObjectCollection`1 persistedCollection)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.get_BackingList()     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.<GetEnumeratorImpl>d__0.MoveNext()     at Microsoft.SharePoint.Administration.SPAlternateUrlCollectionManager.LookupAlternateUrl(Uri canonicalRequestUri)     at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(SPFarm farm, Uri requestUri, Boolean swapSchemeForPathBasedSites, Boolean fallbackToHttpContext, Boolean skipFillFileSystemCache, SPAlternateUrl& alternateUrl, ISPSiteLookupInfo& hostHeaderSiteInfo, Boolean& lookupRequiredContext)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetWebApplicationAndZoneForContext(Uri context, SPWebApplication& webApplication, Nullable`1& zone)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.GetEntityTypesForSecurityGroup...   
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       azcxo   Medium      ...PrincipalType(Uri contextUri, SPClaimProviderOperationOptions mode)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.ConvertFromPrincipalType(Uri contextUri, SPPrincipalType principalType)     at Microsoft.SharePoint.Utilities.SPUtility.SPPrincipalEntityType..ctor(SPPrincipalType scopes, SPPrincipalSource sources, SPWeb web, SPWebApplication webApplication, Nullable`1 urlZone)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipal(SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, Boolean inputIsEmailOnly)     at Microsoft.SharePoint.Administration.SPSiteCollection.ResolvePrincipalForSiteCreation(Uri siteUri, Uri siteHostUri, String loginName, Boolean& isWindowsLegacyAccount, String& userKey)     at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateAdministrationWebService(SPFarm farm, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateBasicServices(SPFarm farm)     at Microsoft.SharePoint.Administration.SPFarmFactory.Create()     at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionS...    
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       azcxo   Medium      ...tringBuilder administrationContentDatabase, SqlConnectionStringBuilder siteMapDatabase, SqlConnectionStringBuilder timerServiceDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()     at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)     at System.Threading.ThreadHelper.ThreadStart()     
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       a6m43   Medium      Querying the DB for Name:[SecurityTokenService] of 0feca8a0-e9f6-436a-a491-172c23d6e5a1 with type:[Microsoft.SharePoint.Administration.Claims.SPSecurityTokenService]    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.FetchId(QualifiedObjectName qName, Boolean& querySucceeded)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.GetObject(String name, Guid parentId, Type type)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetObject(String name, Guid parentId, Type type)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.GetValue[U](String name)     at Microsoft.SharePoint.Administration.Claims.SPSecurityTokenService.get_Local()     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.get_Local()     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderOperations.EntityTypes(Uri context, SPClaimProviderOperationOptions mode, String[] providerNames)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.GetEntityTypesForSecurityGroupPrincipalType(Uri contextUri, SPClaimProviderOperationOptions mode)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.ConvertFromPrincipalType(Uri contextUri, SPPrincipalType principalType)     at Microsoft.SharePoint.Utilities.SPUtility.SPPrincipalEntityType..ctor(SPPrincipalType scopes, SPPrincipalSource sources, SPWeb web, SPWebApplication webApplication, Nullable`1 urlZone)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipal(SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, Boolean inputIsEmailOnly)     at Microsoft.SharePoint.Administration....   
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       a6m43   Medium      ...SPSiteCollection.ResolvePrincipalForSiteCreation(Uri siteUri, Uri siteHostUri, String loginName, Boolean& isWindowsLegacyAccount, String& userKey)     at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateAdministrationWebService(SPFarm farm, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateBasicServices(SPFarm farm)     at Microsoft.SharePoint.Administration.SPFarmFactory.Create()     at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, SqlConnectionStringBuilder siteMapDatabase, SqlConnectionStringBuilder timerServiceDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()     at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)     at Syste...    
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       a6m43   Medium      ...m.Threading.ThreadHelper.ThreadStart()    
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bb3oe   Medium      Name being queried for [Name:SecurityTokenService],[Parent:0feca8a0-e9f6-436a-a491-172c23d6e5a1], [type:Microsoft.SharePoint.Administration.Claims.SPSecurityTokenService] does not exist. Stack Trace:   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.FetchId(QualifiedObjectName qName, Boolean& querySucceeded)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.GetObject(String name, Guid parentId, Type type)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetObject(String name, Guid parentId, Type type)     at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.GetValue[U](String name)     at Microsoft.SharePoint.Administration.Claims.SPSecurityTokenService.get_Local()     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.get_Local()     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderOperations.EntityTypes(Uri context, SPClaimProviderOperationOptions mode, String[] providerNames)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.GetEntityTypesForSecurityGroupPrincipalType(Uri contextUri, SPClaimProviderOperationOptions mode)     at Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.ConvertFromPrincipalType(Uri contextUri, SPPrincipalType principalType)     at Microsoft.SharePoint.Utilities.SPUtility.SPPrincipalEntityType..ctor(SPPrincipalType scopes, SPPrincipalSource sources, SPWeb web, SPWebApplication webApplication, Nullable`1 urlZone)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipal(SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, Boolean inputIsEmailOnly)     at Mic...   
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bb3oe   Medium      ...rosoft.SharePoint.Administration.SPSiteCollection.ResolvePrincipalForSiteCreation(Uri siteUri, Uri siteHostUri, String loginName, Boolean& isWindowsLegacyAccount, String& userKey)     at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)     at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateAdministrationWebService(SPFarm farm, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)     at Microsoft.SharePoint.Administration.SPFarmFactory.CreateBasicServices(SPFarm farm)     at Microsoft.SharePoint.Administration.SPFarmFactory.Create()     at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, SqlConnectionStringBuilder siteMapDatabase, SqlConnectionStringBuilder timerServiceDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()     at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()     at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback cal...    
06/03/2023 20:33:43.97* psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Config DB                       bb3oe   Medium      ...lback, Object state)     at System.Threading.ThreadHelper.ThreadStart()       
06/03/2023 20:33:43.97  psconfigui.exe (0x18EC)                     0x1274  SharePoint Foundation           Monitoring                      b4ly    High        Leaving Monitored Scope: (Creating SPSite: Title:[$Resources:core,nav_CentralAdministrationHome;];CreateFromSiteMaster:False;EffectiveCreateFromSiteMaster:False;CreatingSiteMaster:False;Template:CENTRALADMIN;BatchTableCopy:False;Description:NULL) Execution Time=200.1836; CPU Milliseconds=43; SQL Query Count=11; Parent=Creating Admin SPWebService  

I have verified permissions for the accounts SQL Service Account, SPAdmin and SPFarm and it seems they have beed correctly defined (Database permissions, Winows Permssions, Local Security Policy)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.