Sitecore Docker Container: Resolution for Rebus.Injection.Injectionist+Handler ---> System.Data.SqlClient.SqlException: Login failed for user 'sa'.

Recently noticed that Sitecore Docker Container installation is sensitive to few special characters in sa password. Here are the details about the same. My next assignment is to dig through the getting-started files to find any possible clues. Will keep you posted if I find something. Until then, just keep an eye on the complexity of the sa password you use for Docker installation.

Scenario 1:

1. No SQL Server installed (Windows 10 Pro)

2. Docker Desktop Installed

3. getting-started from github: https://github.com/Sitecore/docker-examples

Run init.ps1 and populate .env file using init.ps1 

sa Password (in .env file): PAssw0rd==(123# 

Docker Compose Up Status: Error


docker logs <container id>:


Error Details:


Docker-compose down
.\Clean.ps1

Scenario 2:

1. No SQL Server installed (Windows 10 Pro)

2. Docker Desktop Installed

3. getting-started from github: https://github.com/Sitecore/docker-examples

Run init.ps1

sa Password (in .env file): PAssw0rd123$


Docker Compose Up Status: Success


Scenario 1 Error:

<Source>EventLog</Source><Time>2020-12-05T07:13:24.000Z</Time><LogEntry><Channel>System</Channel><Level>Error</Level><EventId>7001</EventId><Message>The srv2 service depends on the srvnet service which failed to start because of the following error:   No attempts to start the service have been made since the last boot.</Message></LogEntry>

<Source>EventLog</Source><Time>2020-12-05T07:13:24.000Z</Time><LogEntry><Channel>System</Channel><Level>Error</Level><EventId>7001</EventId><Message>The LanmanServer service depends on the srv2 service which failed to start because of the following error:   The dependency service or group failed to start.</Message></LogEntry>

<Source>EventLog</Source><Time>2020-12-05T07:13:24.000Z</Time><LogEntry><Channel>System</Channel><Level>Error</Level><EventId>701</EventId><Message>Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. Additional Data: Error Value: 2147942450.</Message></LogEntry>

<Source>EventLog</Source><Time>2020-12-05T07:13:24.000Z</Time><LogEntry><Channel>System</Channel><Level>Error</Level><EventId>701</EventId><Message>Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. Additional Data: Error Value: 2147942450.</Message></LogEntry>

2020-12-05 07:14:26.739 +00:00 [Warning] Exception calling GetService() - Service Type: "ContactsController"

Rebus.Injection.ResolutionException: Could not resolve Rebus.Bus.IBus with decorator depth 2 - registrations: Rebus.Injection.Injectionist+Handler ---> System.Data.SqlClient.SqlException: Login failed for user 'sa'.

   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)

   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

   at System.Data.SqlClient.SqlConnection.Open()

   at Rebus.SqlServer.DbConnectionProvider.CreateSqlConnectionSuppressingAPossibleAmbientTransaction()

   at Rebus.SqlServer.DbConnectionProvider.<GetConnection>d__5.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at Rebus.SqlServer.Transport.SqlServerTransport.<InnerEnsureTableIsCreatedAsync>d__23.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at Rebus.SqlServer.Transport.SqlServerTransport.<EnsureTableIsCreatedAsync>d__22.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Comments

  1. I got the same error, how to resolve the second scenario.

    ReplyDelete

Post a Comment

Popular Posts