Orchestrator Upgrade Failed with SSL Provider Error

Orchestrator migration to V23.4 from v20.10. Cannot open an SQL connection to either `master` or UiPath-db.

Error Message:

System.Exception: Migration failed: Cannot open an SQL connection to either `master` or xxxx. If SQL user does not have access to master, ensure xxxx database exists. (A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.)) (A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.))

Troubleshooting Steps:

  • DB account has db_owner privilege to the database instance
  • Old Orchestrator is working good with the exist database connectionString.

Resolution:

  1. Append"TrustServerCertificate=True;MultiSubnetFailover=True" to the connectionString in UiPath.Orchestrator.dll.config, identity\appsettings.Production.json, and webhooks\appsettings.Production.json files
  2. Add the same to the value of db connection string parameters in MSI command line. See below example:

.\UiPathOrchestrator.msi DB_CONNECTION_STRING="Data Source=xxxx;Initial Catalog=xxx;Integrated Security=True;TrustServerCertificate=True;MultiSubnetFailover=True" IS_DB_CONNECTION_STRING="Data Source=xxxx;Initial Catalog=xxx;Integrated Security=True;TrustServerCertificate=True;MultiSubnetFailover=True" UPDSVR_DB_CONNECTION_STRING="" /l*vx install.log /q