While running up.ps1 in step 7 of Create the ScNext(MyProject name locally) solution in Walkthrough: Setting up a development environment with the Sitecore Containers template for Next.js, container mssql-init-1 exciting repeatedly.
This is error log of mssql-init-1 container:
2023-03-06 23:47:06 Start publishing dacpacs
2023-03-06 23:47:06 Configuration option 'contained database authentication' changed from 0 to 1. Run the RECONFIGURE statement to install.
2023-03-06 23:47:06 Starting to deploy 'Sitecore.Core' dacpac ...
2023-03-06 23:47:13 Publishing to database 'Sitecore.Core' on server 'mssql'.
2023-03-06 23:47:18 Initializing deployment (Start)
2023-03-06 23:48:20 Initializing deployment (Complete)
2023-03-06 23:48:20 Analyzing deployment plan (Start)
2023-03-06 23:48:20 Analyzing deployment plan (Complete)
2023-03-06 23:48:20 Updating database (Start)
2023-03-06 23:48:22 Creating Sitecore.Core...
2023-03-06 23:48:23 An error occurred while the batch was being executed.
2023-03-06 23:48:23 *** Could not deploy package.
2023-03-06 23:48:23 Error SQL72014: .Net SqlClient Data Provider: Msg 5118, Level 16, State 1, Line 1 The file "C:\data\Sitecore.Core_Primary.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2023-03-06 23:48:23 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:48:23 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:48:23 ON
2023-03-06 23:48:23 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:48:23 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:48:23
2023-03-06 23:48:23
2023-03-06 23:48:23 Error SQL72014: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2023-03-06 23:48:23 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:48:23 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:48:23 ON
2023-03-06 23:48:23 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:48:23 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:48:23
2023-03-06 23:48:23
2023-03-06 23:48:23
2023-03-06 23:48:24 Get-ChildItem : sqlpackage exited with code 1 while deploying
2023-03-06 23:48:24 C:\resources\Sitecore.Core.dacpac
2023-03-06 23:48:24 At C:\DeployDatabases.ps1:133 char:5
2023-03-06 23:48:24 + Get-ChildItem $_ -Filter *.dacpac | ForEach-Object {
2023-03-06 23:48:24 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-03-06 23:48:24 + CategoryInfo : OperationStopped: (sqlpackage exit...ore.Core.da
2023-03-06 23:48:24 cpac:String) [Get-ChildItem], RuntimeException
2023-03-06 23:48:24 + FullyQualifiedErrorId : sqlpackage exited with code 1 while deploying C:
2023-03-06 23:48:24 \resources\Sitecore.Core.dacpac,Microsoft.PowerShell.Commands.GetChildItem
2023-03-06 23:48:24 Command
2023-03-06 23:48:24
2023-03-06 23:48:23 Updating database (Failed)
2023-03-06 23:48:23 Time elapsed 00:01:10.83
2023-03-06 23:48:24 Starting to deploy 'Sitecore.Processing.pools' dacpac ...
2023-03-06 23:48:29 Publishing to database 'Sitecore.Processing.pools' on server 'mssql'.
2023-03-06 23:48:35 Initializing deployment (Start)
2023-03-06 23:49:35 Initializing deployment (Complete)
2023-03-06 23:49:35 Analyzing deployment plan (Start)
2023-03-06 23:49:35 Analyzing deployment plan (Complete)
2023-03-06 23:49:35 Updating database (Start)
2023-03-06 23:49:37 Creating Sitecore.Processing.pools...
2023-03-06 23:49:38 An error occurred while the batch was being executed.
2023-03-06 23:49:38 Updating database (Failed)
2023-03-06 23:49:38 Time elapsed 00:01:11.00
2023-03-06 23:49:38 *** Could not deploy package.
2023-03-06 23:49:38 Error SQL72014: .Net SqlClient Data Provider: Msg 5118, Level 16, State 1, Line 1 The file "C:\data\Sitecore.Processing.pools_Primary.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2023-03-06 23:49:38 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:49:38 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:49:38 ON
2023-03-06 23:49:38 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:49:38 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:49:38
2023-03-06 23:49:38
2023-03-06 23:49:38 Error SQL72014: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2023-03-06 23:49:38 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:49:38 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:49:38 ON
2023-03-06 23:49:38 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:49:38 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:49:38
2023-03-06 23:49:38
2023-03-06 23:49:38
2023-03-06 23:49:39 Get-ChildItem : sqlpackage exited with code 1 while deploying
2023-03-06 23:49:39 C:\resources\collectiondeployment\Sitecore.Processing.pools.dacpac
2023-03-06 23:49:39 At C:\DeployDatabases.ps1:133 char:5
2023-03-06 23:49:39 + Get-ChildItem $_ -Filter *.dacpac | ForEach-Object {
2023-03-06 23:49:39 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-03-06 23:49:39 + CategoryInfo : OperationStopped: (sqlpackage exit...ng.pools.da
2023-03-06 23:49:39 cpac:String) [Get-ChildItem], RuntimeException
2023-03-06 23:49:39 + FullyQualifiedErrorId : sqlpackage exited with code 1 while deploying C:
2023-03-06 23:49:39 \resources\collectiondeployment\Sitecore.Processing.pools.dacpac,Microsoft
2023-03-06 23:49:39 .PowerShell.Commands.GetChildItemCommand
2023-03-06 23:49:39
2023-03-06 23:50:06 *** Could not deploy package.
2023-03-06 23:50:06 Error SQL72014: .Net SqlClient Data Provider: Msg 5118, Level 16, State 1, Line 1 The file "C:\data\Sitecore.core_Primary.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2023-03-06 23:50:06 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:50:06 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:50:06 ON
2023-03-06 23:50:06 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:49:39 Starting to deploy 'Sitecore.core' dacpac ...
2023-03-06 23:49:44 Publishing to database 'Sitecore.core' on server 'mssql'.
2023-03-06 23:49:47 Initializing deployment (Start)
2023-03-06 23:50:04 Initializing deployment (Complete)
2023-03-06 23:50:04 Analyzing deployment plan (Start)
2023-03-06 23:50:04 Analyzing deployment plan (Complete)
2023-03-06 23:50:04 Updating database (Start)
2023-03-06 23:50:06 Creating Sitecore.core...
2023-03-06 23:50:06 An error occurred while the batch was being executed.
2023-03-06 23:50:06 Updating database (Failed)
2023-03-06 23:50:06 Time elapsed 00:00:24.13
2023-03-06 23:50:06 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:50:06
2023-03-06 23:50:06
2023-03-06 23:50:06 Error SQL72014: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2023-03-06 23:50:06 Error SQL72045: Script execution error. The executed script:
2023-03-06 23:50:06 CREATE DATABASE [$(DatabaseName)]
2023-03-06 23:50:06 ON
2023-03-06 23:50:06 PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf')
2023-03-06 23:50:06 LOG ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS;
2023-03-06 23:50:06
2023-03-06 23:50:09 Sql Sharding deployment tool executing...
2023-03-06 23:50:15 *** Welcome to Sitecore xDB Collection SQL Sharding Deployment Tool ***
2023-03-06 23:50:15 Tool was run with the following configuration:
2023-03-06 23:50:15 Operation: create
2023-03-06 23:50:15 SQL server connection:
2023-03-06 23:50:15 Server name: mssql
2023-03-06 23:50:15 User: sa
2023-03-06 23:50:15 Integrated security: False
2023-03-06 23:50:15 Connection Timeout: 15
2023-03-06 23:50:15 Database edition: Basic
2023-03-06 23:50:15 Elastic Pool:
2023-03-06 23:50:15 Shard map manager database name: Sitecore.Xdb.Collection.ShardMapManager
2023-03-06 23:50:16 Shard map names: ContactIdShardMap, DeviceProfileIdShardMap, ContactIdentifiersIndexShardMap
2023-03-06 23:50:16 Shard number: 2
2023-03-06 23:50:16 Shard name prefix: Sitecore.Xdb.Collection.Shard
2023-03-06 23:50:16 Shard name suffix:
2023-03-06 23:50:16 Dacpac file path: C:\\resources\\Sitecore.Xdb.Collection.Database.Sql.dacpac
2023-03-06 23:50:16 Force operation: False
2023-03-06 23:50:18 Shard Map Manager has not yet been created
2023-03-06 23:50:18 Creating database Sitecore.Xdb.Collection.ShardMapManager
2023-03-06 23:50:19 The file "C:\data\Sitecore.Xdb.Collection.ShardMapManager.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2023-03-06 23:50:06
2023-03-06 23:50:06
2023-03-06 23:50:07 Get-ChildItem : sqlpackage exited with code 1 while deploying
2023-03-06 23:50:07 C:\resources\jss\Sitecore.core.dacpac
2023-03-06 23:50:07 At C:\DeployDatabases.ps1:133 char:5
2023-03-06 23:50:07 + Get-ChildItem $_ -Filter *.dacpac | ForEach-Object {
2023-03-06 23:50:07 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-03-06 23:50:07 + CategoryInfo : OperationStopped: (sqlpackage exit...ore.core.da
2023-03-06 23:50:07 cpac:String) [Get-ChildItem], RuntimeException
2023-03-06 23:50:07 + FullyQualifiedErrorId : sqlpackage exited with code 1 while deploying C:
2023-03-06 23:50:07 \resources\jss\Sitecore.core.dacpac,Microsoft.PowerShell.Commands.GetChild
2023-03-06 23:50:07 ItemCommand
2023-03-06 23:50:07
2023-03-06 23:50:24 Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'sa'..
2023-03-06 23:50:19 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. System.Data.SqlClient.SqlException (0x80131904): The file "C:\data\Sitecore.Xdb.Collection.ShardMapManager.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2023-03-06 23:50:19 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2023-03-06 23:50:19 at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
2023-03-06 23:50:19 at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
2023-03-06 23:50:19 at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
2023-03-06 23:50:19 at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
2023-03-06 23:50:19 at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
2023-03-06 23:50:19 at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
2023-03-06 23:50:19 at Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.<>c__DisplayClass13_0`1.<Execute>b__0()
2023-03-06 23:50:19 at Sitecore.Framework.TransientFaultHandling.EntLib.RetryPolicy.ExecuteAction[TResult](Func`1 func)
2023-03-06 23:50:19 at Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.Execute[T](IDbConnection connection, Func`1 sqlWork, Func`2 commandRetryPolicy)
2023-03-06 23:50:19 at Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.SqlDatabaseManager.CreateDatabase(String serverName, String databaseName)
2023-03-06 23:50:19 at Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.Operations.CreateShardClusterOperation.CreateShardMapManagerAndShard(IShardDeploymentManager shardDeploymentManager, IShardClusterManager shardManager, ISqlDatabaseManager sqlDatabaseManager, IDacpacManager dacpacManager, IRangeManager rangeManager, IConfiguration configuration)
2023-03-06 23:50:19 at Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.Operations.CreateShardClusterOperation.Execute(IManagersFactory managers)
2023-03-06 23:50:19 at Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.OperationContext.Execute(String operationKey, IManagersFactory factory)
2023-03-06 23:50:19 at Sitecore.Xdb.Collection.Database.SqlShardingDeploymentTool.Program.ExecuteApplication()
2023-03-06 23:50:19 ClientConnectionId:dea7c591-0b54-47a9-8b7e-d85f85b8e539
2023-03-06 23:50:19 Error Number:5118,State:1,Class:16
2023-03-06 23:50:24 Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Cannot open database "Sitecore.Core" requested by the login. The login failed..
2023-03-06 23:50:24 sqlcmd exited with code 1 while setting Sitecore admin password
2023-03-06 23:50:24 At C:\SetSitecoreAdminPassword.ps1:29 char:5
2023-03-06 23:50:24 + throw "sqlcmd exited with code $LASTEXITCODE while setting Siteco ...
2023-03-06 23:50:24 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-03-06 23:50:24 + CategoryInfo : OperationStopped: (sqlcmd exited w... admin pass
2023-03-06 23:50:24 word:String) [], RuntimeException
2023-03-06 23:50:24 + FullyQualifiedErrorId : sqlcmd exited with code 1 while setting Sitecore
2023-03-06 23:50:24 admin password
2023-03-06 23:50:24
Steps I have tried so far
- I have changed the Docker Engine setting to
{ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } }, "dns": [ "8.8.8.8", "1.1.1.1" ], "experimental": false, "features": { "buildkit": true } } 2) Cleaned all the docker containers, Pruned it, Restarted machine, Restarted Docker engine multiple times 3) Tried in different network(office, home, with zscaler, w/o Zscaler)
I am getting the same "login failed" message for the same SQL server init container.
Please share the solution? Thank for your support!