SQL fails to install when defining domain accounts for services?
Closed this issue ยท 0 comments
๐ป Brief Description
Hello. I'm testing a cookbook via kitchen that calls the sql_server_install resource. The installation of SQL fails when I define a domain account to run the Sql server and Agent services, but succeeds when I don't.
๐ฅ Cookbook version
6.2.1
๐ฉโ๐ณ Chef-Infra Version
17.1.35
๐ฉ Platform details
Windows Server 2016
Steps To Reproduce
- Create test kitchen instance, instance is domain joined as part of the creation process
- converge cookbook
The cookbook does the following:
- Maps network share containing setup files to X:
- Calls the sql_server_install resource with the following params:
sql_server_install do
accept_eula true
agent_account 'mydomain\\sqlagent'
agent_account_pwd '******'
agent_startup 'Automatic'
feature %w(SQLENGINE FULLTEXT CONN BC)
install_dir 'S:\\Program Files\\Microsoft SQL Server'
instance_dir 'S:\\Program Files\\Microsoft SQL Server'
instance_name 'MSSQLSERVER'
netfx35_install false
product_key '88888-88888-88888-88888-88888'
sa_password '***********'
security_mode 'Mixed Mode Authentication'
source_url 'X:\\setup.exe'
sql_account 'mydomain\\sqlsrvr'
sql_account_pwd '******'
sql_backup_dir 'R:\\Backups'
sql_collation 'SQL_Latin1_General_CP1_CI_AS'
sql_temp_db_dir 'T:\\Data'
sql_temp_db_log_dir 'G:\\Logs'
sql_user_db_dir 'D:\\Data'
sql_user_db_log_dir 'G:\\Logs'
sysadmins ['mydomain\\dba', 'mydomain\\sqldm']
version '2017'
end
๐ Expected behavior
SQL should install successfully and the defined domain accounts above should be running the SQL server and Agent services. Instead the install fails.
If I call the install resource above without the agent_account, agent_account_pwd, sql_account and sql_account_pwd defined, which causes the install to use the built-in local accounts instead to run the services, the installation is successful.
The SQL bootstrap log (full output in link below) shows an access denied error:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061762559
Exit facility code: 1308
Exit error code: 1
Exit message: Access is denied.
Start time: 2021-05-21 23:26:41
End time: 2021-05-21 23:27:40
Requested action: Install
โ Additional context
- I've verified the validity of the passwords for the domain service accounts
- I've looked at the generated ConfigurationFile.ini that the cookbook generates and it looks correct when compared to one generated by a manual installation.
- The chef run output is here: https://pastebin.com/6Qn6jUwr
- The SQL bootstrap log is here: https://pastebin.com/JeDaqGKW