New-SPConfigurationDatabase : Value cannot be null

Topics: Support
May 22, 2015 at 6:20 PM
I have been getting the following error, that I do not understand how to fix. The Configuration Database appears to be created.

PS>TerminatingError(Get-SPFarm): "Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again."
New-SPConfigurationDatabase : Value cannot be null.
Parameter name: password
At C:\Temp\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:1652 char:13
  • New-SPConfigurationDatabase -DatabaseName "$configDB" -DatabaseServe ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase:SPCmdletNewSPConfigurationDatabase) [New
      -SPConfigurationDatabase], ArgumentNullException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase
PS>TerminatingError(): " - Error creating new farm configuration database"
TerminatingError(): " - Error creating new farm configuration database"
Any assistance to correct this would be appreciated.
May 25, 2015 at 12:59 PM
Edited May 25, 2015 at 12:59 PM
Few Questions:
Do you face the same error if you are using Configuration Wizard? If yes, try to disconnect that server from the farm, manually deleted the the configuration database and any other database created by the install and retry running the installer?
Do you are account used for running AutoSPInstaller have both DBCreator and SecurityAdmin on the SQL Server instance?
How many servers are there in the farm? If more than one, are you facing this error for the first server or subsequent one?

If you still have the issue, it will be helpful to share your XML.
May 25, 2015 at 3:34 PM
The Configuration Wizard is also failing with more detail in the Event logs:

Failed to create the configuration database.
An exception of type System.ArgumentNullException was thrown. Additional exception information: Value cannot be null.
Parameter name: password
System.ArgumentNullException: Value cannot be null.
Parameter name: password
at Microsoft.SharePoint.Administration.SPFarm.ValidateLogonAccount(String& username, SecureString password)
at Microsoft.SharePoint.Administration.SPManagedAccount.SetPassword(SecureString value)
at Microsoft.SharePoint.Administration.SPApplicationPool..ctor(String name, SPWebService service)
at Microsoft.SharePoint.Administration.SPWebApplication.CreateDefaultInstance(SPWebService service, Guid id, String applicationPoolId, SPProcessAccount processAccount, String iisServerComment, Boolean secureSocketsLayer, String iisHostHeader, Int32 iisPort, Boolean iisAllowAnonymous, DirectoryInfo iisRootDirectory, Uri defaultZoneUri, Boolean iisEnsureNTLM, Boolean createDatabase, String databaseServer, String databaseName, String databaseUsername, String databasePassword, SPSearchServiceInstance searchServiceInstance, Boolean autoActivateFeatures)
at Microsoft.SharePoint.Administration.SPWebApplication.CreateDefaultInstance(SPWebService service, Guid id, String applicationPoolId, IdentityType identityType, String applicationPoolUsername, SecureString applicationPoolPassword, String iisServerComment, Boolean secureSocketsLayer, String iisHostHeader, Int32 iisPort, Boolean iisAllowAnonymous, DirectoryInfo iisRootDirectory, Uri defaultZoneUri, Boolean iisEnsureNTLM, Boolean createDatabase, String databaseServer, String databaseName, String databaseUsername, String databasePassword, SPSearchServiceInstance searchServiceInstance, Boolean autoActivateFeatures)
at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.CreateDefaultInstance(SqlConnectionStringBuilder administrationContentDatabase, SPWebService adminService, IdentityType identityType, String farmUser, SecureString farmPassword)
at Microsoft.SharePoint.Administration.SPFarm.CreateAdministrationWebService(SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)
at Microsoft.SharePoint.Administration.SPFarm.CreateBasicServices(SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword)
at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, IdentityType identityType, String farmUser, SecureString farmPassword, SecureString masterPassphrase)
at Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase, String farmUser, SecureString farmPassword, SecureString masterPassphrase)
at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()
at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
May 25, 2015 at 3:35 PM
How can I upload the files?
Coordinator
Jun 18, 2015 at 4:14 AM
No need to upload full XML, maybe just paste the section containing the <Farm>node. Note though that if the error still occurs outside of AutoSPInstaller, it might be a question best posed to another general SharePoint forum (e.g. MSDN, Stack Exchange, etc.)

Brian