Hi,
I just went through a process to upgrade our hosted Octopus Deploy from 2019.1.5 to 2019.3.5 but it appears to have failed on the database schema update.
Looking over the logs this appears to be what started it
2019-06-24 10:01:51.5041 2484 9 ERROR This Octopus Server node called 'EC2AMAZ-B7KKH5A' failed to heartbeat and has been demoted to Follower in the cluster.
System.Exception: Error while executing SQL command in transaction ‘OctopusClusterService.UpdateLastSeen’: Invalid column name ‘LastSeen’.
Invalid column name ‘Rank’.
Invalid column name ‘IsOnline’.
The command being executed was:
UPDATE dbo.[OctopusServerNode] SET [Name] = @Name, [LastSeen] = @LastSeen, [Rank] = @Rank, [MaxConcurrentTasks] = @MaxConcurrentTasks, [IsInMaintenanceMode] = @IsInMaintenanceMode, [IsOnline] = @IsOnline, [JSON] = @JSON WHERE [Id] = @Id —> System.Data.SqlClient.SqlException: Invalid column name ‘LastSeen’.
Invalid column name ‘Rank’.
Invalid column name ‘IsOnline’.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Nevermore.Transient.IDbCommandExtensions.<>c__DisplayClass2_0.<ExecuteNonQueryWithRetry>b__0() at Nevermore.Transient.RetryPolicy.ExecuteAction[TResult](Func
1 func)
at Nevermore.RelationalTransaction.Update[TDocument](TDocument instance, String tableHint, Nullable1 commandTimeoutSeconds) --- End of inner exception stack trace --- at Nevermore.RelationalTransaction.Update[TDocument](TDocument instance, String tableHint, Nullable
1 commandTimeoutSeconds)
at Octopus.Core.Model.Clustering.OctopusClusterService.UpdateLastSeen()
at Octopus.Core.Model.Clustering.OctopusClusterService.TryHeartbeat()
2019-06-24 10:01:51.5197 2484 9 ERROR Failed to record the demotion of the Octopus Server node called ‘EC2AMAZ-B7KKH5A’. Another node should elect itself as the leader if this node appears to be offline for long enough. If a new leader is not elected try stopping this node and starting it again.
System.Exception: Error while executing SQL command in transaction ‘OctopusClusterService:TryRecordDemotionInDatabase’: Invalid column name ‘LastSeen’.
Invalid column name ‘Rank’.
Invalid column name ‘IsOnline’.
The command being executed was:
UPDATE dbo.[OctopusServerNode] SET [Name] = @Name, [LastSeen] = @LastSeen, [Rank] = @Rank, [MaxConcurrentTasks] = @MaxConcurrentTasks, [IsInMaintenanceMode] = @IsInMaintenanceMode, [IsOnline] = @IsOnline, [JSON] = @JSON WHERE [Id] = @Id —> System.Data.SqlClient.SqlException: Invalid column name ‘LastSeen’.
Invalid column name ‘Rank’.
Invalid column name ‘IsOnline’.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Nevermore.Transient.IDbCommandExtensions.<>c__DisplayClass2_0.<ExecuteNonQueryWithRetry>b__0() at Nevermore.Transient.RetryPolicy.ExecuteAction[TResult](Func
1 func)
at Nevermore.RelationalTransaction.Update[TDocument](TDocument instance, String tableHint, Nullable1 commandTimeoutSeconds) --- End of inner exception stack trace --- at Nevermore.RelationalTransaction.Update[TDocument](TDocument instance, String tableHint, Nullable
1 commandTimeoutSeconds)
at Octopus.Core.Model.Clustering.OctopusClusterService.TryRecordDemotionInDatabase()
I can upload the entire OctopusServer log if required. Currently I’ve rolled back the OD servers to 2019.1.5 and pointed to OD servers to an RDS that was snapshotted before the change.
Are you able to assist in getting my production database in a state where it will work with 2019.3.5?
Thanks
Anthony