Upgrade problems from 2019.10.17 to 2020.10.4

Hi,

when I try to upgrade Orchestrator from version 2019.10.17 to 2020.10.4 I get an error message, see below.
Upgrade command is: >.\UiPathOrchestrator.msi ADDLOCAL=OrchestratorFeature ORCHESTRATORFOLDER=“D:\apps\Orchestrator” APP_ENCRYPTION_KEY=<my_app_enc_key_from_web.config>

After aborting the installer there is an additional Table in the DB named DOMAIN\myusername.__PackagesMigration which looks weird. DOMAIN\myusername is the administrator account I use on the Orchestrator server to do the upgrade. DB account for Orchestrator is another DOMAIN\serviceaccount.

This is he error:

Migrating packages to the FileSystem storage in the location ‘.\Storage’

Migration Started…
[Error]: Failed Finishing Migration.
System.Data.SqlClient.SqlException (0x80131904): Invalid object name ‘dbo.__PackagesMigration’.

  • at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)*
  • at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)*
  • at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)*
  • at System.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, String endMethod, Boolean isInternal)*
  • at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)*
  • at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)*
  • at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)*
    — 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 UiPath.Orchestrator.Setup.PackagesMigration.DatabaseHelper.d__10.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 UiPath.Orchestrator.Setup.PackagesMigration.Migration.d__16.MoveNext()*
    ClientConnectionId:4584abe5-b086-4752-afee-c86d85b1b603
    Error Number:208,State:1,Class:16
    Migration failed: Invalid object name ‘dbo.__PackagesMigration’.
    System.Data.SqlClient.SqlException (0x80131904): Invalid object name ‘dbo.__PackagesMigration’.
  • at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)*
  • at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)*
  • at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)*
  • at System.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, String endMethod, Boolean isInternal)*
  • at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)*
  • at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)*
  • at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)*
    — 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 UiPath.Orchestrator.Setup.PackagesMigration.DatabaseHelper.d__10.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 UiPath.Orchestrator.Setup.PackagesMigration.Migration.d__16.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 UiPath.Orchestrator.Setup.PackagesMigration.ParallelMigrator.d__11.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 UiPath.Orchestrator.Setup.PackagesMigration.MigrationProcess.d__27.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 UiPath.Orchestrator.Setup.PackagesMigration.MigrationProcess.d__19.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 UiPath.Orchestrator.Setup.PackagesMigration.Program.d__1.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 UiPath.Orchestrator.Setup.PackagesMigration.Program.d__0.MoveNext()*
    ClientConnectionId:4584abe5-b086-4752-afee-c86d85b1b603
    Error Number:208,State:1,Class:16

Package migration has completed. Some packages have failed to migrate. Please check the Orchestrator Installation Troubleshooting section in the online documentation.

--------------------

System.Exception: Init Host: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.

  • at UiPath.Orchestrator.Setup.DatabaseMigration.DatabaseMigrator.InstallOrUpdateDatabase()*
  • at UiPath.Orchestrator.Web.Startup.UiPathWebModule.PreInitialize()*
  • at UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.Measure(IEnumerable1 modules, Action1 action, String operation, String type)*
  • at UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.StartModules()*
  • at Abp.AbpBootstrapper.Initialize()System.Exception: Init Host: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.*
  • at void UiPath.Orchestrator.Setup.DatabaseMigration.DatabaseMigrator.InstallOrUpdateDatabase()*
  • at void UiPath.Orchestrator.Web.Startup.UiPathWebModule.PreInitialize()*
  • at void UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.Measure(IEnumerable modules, Action action, string operation, string type)*
  • at void UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.StartModules()*
  • at void Abp.AbpBootstrapper.Initialize()*

Any ideas? Thanks in advance.

Hi @oliver.schwinn,

If you have the enterprise version, you should reach the UiPath support to help you.
For sure it my speed up the resolution.

Vasile.

After involving UIPath support, this got solved. For those who might have similar problems:

  • When you use dedicated Active Directory user for the Orchestrator MSSQL database, make THAT user a local admin on the Orchestrator machine and issue the upgrade command logged in as this user (e.g. .\UiPathOrchestrator.msi /lvx log.txt ADDLOCAL=OrchestratorFeature ORCHESTRATORFOLDER=“C:\apps\Orchestrator” APP_ENCRYPTION_KEY="***")

  • After the upgrade there are TWO NEW ApplicationPools running under the “ApplicationPoolIdentity”: “WebHooks” and “Identity”. Since we had the Orchestrator AppPool running under “Domain\DB-service-aaccount” mentioned above, CHANGE the Identity for all 3 AppPools to this account and restart IIS

I wish this detail would have been documented in the install & upgrade manual (or did I miss it?)

Best Regards
Oliver

2 Likes