Octo import null reference exception check worker pools

I have an exported project file that was generated by another development team from Octopus 2018.4.4, which I am trying to test locally for QA purposes (the file will be distributed to a network of developers). I’ve installed 2018.6.1, initially in a VM and now on my local box. To verify my installation, I created a small project; exported it with octo.exe; deleted the project; reimported it; and ran the deployment successfully. In both the VM and localhost I get the output below, and I have not been able to find anyone reporting a similar problem - leaving me with no clue what the problem might be. I should note that I have setup the same Environments, NuGet feed, and Step Templates as the team that developed this project. Any advice on how to further troubleshoot this would be much appreciated.

Octopus Deploy Command Line Tool, version 4.37.0

Handshaking with Octopus server: http://localhost:85
Handshake successful. Octopus version: 2018.6.1; API version: 3.0.0
Authenticated as: xyz <xyz@example.org>
Finding importer 'project'
Validating the import
Export file successfully loaded
Checking that lifecycle Default Lifecycle exists
Found lifecycle 'Default Lifecycle'
Checking that all environments exist
Checking that all machines exist
Checking that all NuGet Feeds exist
Checking that all Action Templates exist
Checking that all Library Variable Sets exist
Checking that the Project Group exist
Checking that all channel lifecycles exist
Checking that all worker pools exist

System.NullReferenceException: Object reference not set to an instance of an object.
   at Octopus.Cli.Importers.ProjectImporter.<CheckWorkerPoolsExist>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Octopus.Cli.Importers.ProjectImporter.<Validate>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Commands.ImportCommand.<Execute>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Octopus.Cli.Commands.ApiCommand.<Execute>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.CliProgram.Run(String[] args)
Exit code: -3

Hi, thanks for getting in touch.

The migrator is designed to export-import into the same version of Octopus (see the docs here), so this is failing because of features that got added in 2018.6 that weren’t in 2018.4.

There’s a couple of ways to handle it - all of them will require the versions of octopus you are importing to being the same as the export machine.

  1. If you’re eventual import machines are at 2018.4, then install your test VM on that version.
  2. If you’re importing into 2018.6 Octopus servers, you could update the original machine.
  3. If you’re importing into 2018.6 Octopus servers, but can’t update the origin server, you could install your VM at version 2018.4.4, import the project, then update the VM to 2018.6.x and re-export and that will give you a 2018.6.x version of the export file.

Hope one of those options sounds right for you. If not, get back in touch.;

Michael

Thank you for this advice. The statement about needing the same version is indeed quite clear. Interestingly, before your response I tried several prior (2018) releases of octo.exe and every one that I tried worked, except 4.37.0.

Regards,

Stephen

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