The target principal name is incorrect.

Error Upgrading Orchestrator from version 20.10 to 21.10

System.Exception: Error:-1, Message: 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.) at UiPath.OrchestratorCAs.IdentityDatabaseManager.RunDbMigrationToolObfuscatedLogging(String arguments, String[] tokensToObfuscate)

Cause:

  • The error suggests an SSL handshake issue while logging in to the SQL server with the given connection string.

Resolution:
  • Please ensure that the SQL connection string has the server FQDN instead of the hostname.
  • Please add the parameter TrustServerCertificate=True in the connection string.