Audit view problem

Hello,
We have a problem with new version of Octopus Deploy. We want to migrate our old instance v2019.7.x to new 2020.5.x. To minimize risk of migration, We decided to prepare production snapshot of our data and check against new version. We use Docker Linux image for that propose. Can you help us ?

  • Problem
    In audit view, during expanding log record, Octopus reports a error with message: Object reference not set to an instance of an object.


    Request GET for resource: /api/events/Events-x ends with status code 500

  • What I expect ?
    Expanding log record is completed successfully.

  • How to reproduce?
    We did some sort of analysis. We noticed that error occurred, when database column with name ChangeDetails in table Event is NULL. It’s very weird, because some of old events, contains value, but some not (something is not migrated to new version?). System Integrity Check looks fine and there are no problems.

Server Error log, to inspect Event class:

Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Server.Web.Api.Actions.GetEventResponder.DetectCorruptedDiff(Event model) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Api\Actions\GetEventResponder.cs:line 99
at Octopus.Server.Web.Api.Actions.GetEventResponder.DoCorruptionCheck(Event model, IOctopusRelationalTransaction transaction) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Api\Actions\GetEventResponder.cs:line 50
at Octopus.Server.Web.Api.Actions.GetEventResponder.ExecuteRegistered(String id) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Api\Actions\GetEventResponder.cs:line 41
at Octopus.Server.Web.Infrastructure.Api.CustomActionWithIdResponder`1.ExecuteRegistered() in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Infrastructure\Api\CustomActionResponder.cs:line 46

Update:
Old events, where that column have a value and API response contains field:
“ChangeDetails”: {
“DocumentContext”: null,
“Differences”: null
}

No error Occurred

Hi @Piotr,

Thank you for contacting Octopus Support.

I hope you don’t mind, I have a few clarifying questions:

  • Was your SQL db migrated to a new server as well?
  • When you installed Octopus Server on the new machine, did you install your current version (2019.7.X) prior to upgrading to 2020.5.X?
  • Can you provide any additional relevant details about the migration/upgrade?

I look forward to hearing back from you.

Regards,
Donny

Hello @donny.bell,
I try to reply to your questions.

  1. Was your SQL db migrated to a new server as well?
    Yes. Currently our 2019.7.X instance works with SQL Server 2014 Express. We created full dump of that database. Then We import data to new SQL Server 2017 Web version.

  2. When you installed Octopus Server on the new machine, did you install your current version (2019.7.X) prior to upgrading to 2020.5.X?
    No. We started with version 2020.5.x Linux Docker Image. We prepared Linux Machine, where we run docker image.
    Link: Docker Hub

  3. Can you provide any additional relevant details about the migration/upgrade?
    As I described above, We try to migrate to new version. To test Octopus against this huge change, We created dump of our production database (snapshot). Then We import dump to new SQL database and configure our Docker. It looks that migration process pass. Database integrity check works fine, artifacts and packages also looks ok.

Hi @Piotr,

Thank you for getting back to me.

According to our documentation:

Octopus Server Linux Containers are part of our Early Access Program (EAP) and may contain bugs or be unstable.

With that in mind, since this is a new feature, I would recommend spinning up a temporary Windows VM, install Octopus Server 2019.7.X, connect to a fresh restore of your SQL db in SQL 2017, then upgrade Octopus Server to version 2020.1.22 on that Windows VM, then upgrade again to 2020.5.X on the Windows VM.

After that, then try connecting the db to the Octopus Server Linux Container.

Let me know if that yields better results.

Regards,
Donny

Hello again @donny.bell,
I prepared environment as you described and Audit Log looks ok. So We decided to upgrade production Octopus instance in four steps, to do this gracefully. Then We back to Linux Container. Thanks for help.

Regards,
Piotr

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.