What if I am unable to log in and getting “SCRAM-SHA-256” errors in my SDApiService.log file?

If SmartDeploy will not let you log in and SDApiService.log shows SCRAM-SHA-256 authentication errors, the endpoint ID of the console machine may have changed, which breaks authentication with the local MongoDB database. To fix it, run the MongoFixOptions.ps1 script as an administrator and select Option 6 to turn off MongoDB authentication.

Where is the log located?

By default, the SDApiService.log file is located at:
C:\SmartDeploy\Logs\SDApiService.log

If the file is not found in that location or the timestamp is not recent, check the SmartDeploy folder where your images are stored for a copy.


What would the error look like in your log?

An example of the error message you might see:

Fatal Service failed to start. One or more errors occurred. (Unable to authenticate using SASL protocol mechanism SCRAM-SHA-256.)
MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using SASL protocol mechanism SCRAM-SHA-256.

What causes SCRAM-SHA-256 authentication errors in SmartDeploy?

SmartDeploy uses the endpoint ID of the console machine to authenticate with the local MongoDB database.

When a virtual machine (VM) is moved or its platform changes, this endpoint ID may also change due to differences in the underlying hardware. These changes can cause authentication failures when SmartDeploy attempts to connect to MongoDB.


How do I fix SCRAM-SHA-256 authentication errors?

This issue can be resolved by disabling authentication on the local MongoDB database. Doing so removes the dependency on the endpoint ID for authentication.

To disable authentication, use the MongoFixOptions.ps1 PowerShell script attached to this article.

  1. Download the script: MongoFixOptions.ps1
  2. Save it in a convenient location.
  3. Run the script as an administrator.
  4. If the script runs successfully, a list of available options appears. Select Option 6 – Toggle Mongo & Console Authentication. This option enables or disables authentication in SmartDeploy’s MongoDB connection string.

Run the script from an elevated Command Prompt

To run the script from an elevated Command Prompt, use the following commands:

powershell -executionpolicy bypass -file (filepath of PowerShell file)

An example of this, if the downloaded PowerShell script (MongoFixOptions.ps1) is located in C:\temp, would be:

powershell -executionpolicy bypass -file "C:\temp\MongoFixOptions.ps1"

If the issue is not resolved, collect the full console host logs from the advanced settings of the sign-in page. The logs should be in a zip folder that you can attach to a support ticket.

Was this article helpful?