Cannot add Deployment Targets

ruf-r
(Brychan Lewis) #1

Hi. We’ve just installed Octopus Deploy and are having a problem adding deployment targets. We’ve installed the latest Tentacle agent on a target and when we try and create the target in the Octopus console we get the following error. We’re using 2018.10.5 LTS version of Octopus.

Octopus v2018.10.5

TypeError: Cannot read property ‘RunType’ of null

buildTentacleEndpointHealthCheckHtml (/app/areas/infrastructure/components/MachinePolicySummary/MachinePolicySummary.tsx:122:78)
render (/app/areas/infrastructure/components/MachinePolicySummary/MachinePolicySummary.tsx:42:54)
Lf (/node_modules/react-dom/cjs/react-dom.production.min.js:147:337)
sf:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(nf())null===c&& (/node_modules/react-dom/cjs/react-dom.production.min.js:150:232)
e (/node_modules/react-dom/cjs/react-dom.production.min.js:182:349)
g (/node_modules/react-dom/cjs/react-dom.production.min.js:183:347)
p (/node_modules/react-dom/cjs/react-dom.production.min.js:184:366)
0;null!==a&&c;){c=!1;if(a.pendingWorkPriority===T||a.pendingWorkPriority>b)c=!0,a.pendingWorkPriority=b;null!==a.alternate&&(a.alternate.pendingWorkPriority===T||a.alternate.pendingWorkPriority>b)&&(c=!0,a.alternate.pendingWorkPriority=b);if(null===a[“return”])if (/node_modules/react-dom/cjs/react-dom.production.min.js:188:389)
S (/node_modules/react-dom/cjs/react-dom.production.min.js:187:415)
enqueueSetState (/node_modules/react-dom/cjs/react-dom.production.min.js:140:181)

Can you help us please?

(John Simons) #5

Hi Brychan,

Thanks for reaching out, Sorry to hear you have hit this issue with Octopus.
So I have just tried Octopus Server v2018.10.5 with a Listening Tentacle v4.0.1 and I had no problems adding the target.
Is this the same combo you are using?

Regards
John

(Brychan Lewis) #6

Hi John

Many thanks for your quick reply.

That’s correct, we have Octopus Server v2018.10.5 (x64) and Tentacle agent v4.0.1 (x64). We’re completely new to Octopus and this is our first installation so your help is
greatly appreciated as we have no experience to draw on here. I’ve run a telnet from the Octopus server to the target server on the tentacle agent listen port and was able to connect so I don’t think we’ve got a connectivity issue.

Regards

Brychan

Brychan Lewis

Senior Specialist, IT Change

DST |
1 London Road, Brentwood, Essex, CM14 4QP, UK

t: +44 (0)20 3975 8628

Brychan.Lewis@uk.dstsystems.com |
www.ssctech.com
|
www.dstsystems.com

Follow us:
|
|

(John Simons) #7

Hi Brychan,

It definitely does not feel like a connectivity issue.
The issue seems to be with that screen.
You have just started, I was wondering if you install the latest LTS version, this works? The latest is v2019.3.4 - https://octopus.com/downloads, are you able to try this?

Regards
John

(Brychan Lewis) #8

Hi John

We’ve upgraded as suggested but unfortunately I’m still getting the same error when trying to add the deployment endpoint.

Thanks

Brychan

Brychan Lewis

Senior Specialist, IT Change

DST |
1 London Road, Brentwood, Essex, CM14 4QP, UK

t: +44 (0)20 3975 8628

Brychan.Lewis@uk.dstsystems.com |
www.ssctech.com
|
www.dstsystems.com

Follow us:
|
|

(Brychan Lewis) #9

Hi John

We had imported a project that had been exported from a higher version of Octopus before we started having this tentacle agent issue so we’ve restored our Octopus server to
before we imported the project and upgraded it to v2019.3.4. We successfully added a tentacle agent then imported the project and now we’re having the same problem adding tentacle agents again. Any thoughts on what’s causing this please? We need to use this
exported project as a starting point for our implementation…

Many thanks

Brychan

Brychan Lewis

Senior Specialist, IT Change

DST |
1 London Road, Brentwood, Essex, CM14 4QP, UK

t: +44 (0)20 3975 8628

Brychan.Lewis@uk.dstsystems.com |
www.ssctech.com
|
www.dstsystems.com

Follow us:
|
|

#12

Hi Brychan,
Your last comment raised a flag for me. You say that you imported a project from a higher version of Octopus? There have been some changes to the MachinePolicy model in the newer version of Octopus and my hunch is that you have inadvertently imported this MachinePolicy into the older version of Octopus which doesn’t match what it is expecting. If you look at the raw API traffic of the MachinePolicy (or check in the import data for the MachinePolicy in question) , does it have a property like

 "MachineHealthCheckPolicy": {
    "TentacleEndpointHealthCheckPolicy": 

or

 "MachineHealthCheckPolicy": {
    "PowerShellHealthCheckPolicy": 

If you are running on the older LTS then it should be showing the TentacleEndpointHealthCheckPolicy property. We typically dont support importing data from other Octopus Server instances that aren’t the same version for this reason. In future we should probably block the import from taking place.

To get your instance sorted, are you able to avoid importing the exported project directly and instead manually add the process into the older instance? If not, you may be able to “hack” the import in place by locating and manually modifying the MachinePolicy export file to look more like what your older instance currently looks like (which you can find by hitting the API, check out the network traffic).

Let me know if either of these options work for you or if it looks like i am barking up the wrong tree.
Cheers,
Rob

(Brychan Lewis) #13

Hi Robert

Thanks very much for your email, you were correct in that the issue was with the MachinePolicy that was imported with the project. The MachinePolicy in the project was set
as Default so we ended up with two default MachinePolicies inside our default space, I updated the IsDefault flag for the imported policy to ‘0’ and that allowed us to access the original default MachinePolicy which we can use for importing targets.

I have a couple more questions please:

  1. The policy we imported was exported using import/export wizard and on the original server it was in the default space so when I import it we get it in the default space
    on our server. I want to have separate spaces for different systems so I would like to be able to get this project into a different space. Looking at Support questions it looks like there’s no quick easy ’one click’ way to do that yet, is this correct? If
    so, could I export the project from my server using Octo.exe and then import it back into my server but into a different space using the --space option?

  2. When so you expect v2019.4.7 to be released as a LTS version please?

Many thanks

Brychan

Brychan Lewis

Senior Specialist, IT Change

DST |
1 London Road, Brentwood, Essex, CM14 4QP, UK

t: +44 (0)20 3975 8628

Brychan.Lewis@uk.dstsystems.com |
www.ssctech.com
|
www.dstsystems.com

Follow us:
|
|

#14
  1. You are correct that there is currently no simple mechanism for moving projects between spaces. For the time being if you use the --space option it should work,
  2. As outlined in our docs we push out a new LTS branch every three months, that means that the code in 2019.4.6 will be in an LTS release under 2019.6.x, which is probably slated for early July.
    Cheers,
    Rob
(Brychan Lewis) #15

Hi Rob

Thanks for your reply. I’ve exported the project using Octo.exe and am trying to import it into a new space. I had to manually create a number of LibraryVariableSets a ProjectGroup
and a Lifecycle before it would start the import, it’s not gone part of the way through the import and is throwing the following error, do you have any suggestions what it needs here please?

Octopus Server returned an error: Attempt to access a document with Id ActionTemplates-12 and SpaceId Spaces-1 that doesn’t match the current execution context

Server exception:

Attempt to access a document with Id ActionTemplates-12 and SpaceId Spaces-1 that doesn’t match the current execution context

Octopus.Core.Spaces.MismatchedSpaceIdException

at Octopus.Server.Web.Infrastructure.OctopusQueryExecutor.DocumentPartitionDoesNotMatchExecutionPartition(IId document)

at Octopus.Server.Web.Infrastructure.OctopusQueryExecutor.GetPartitionFor(IId document)

at Octopus.Server.Web.Infrastructure.OctopusQueryExecutor.AssertLoadedResultCanBeViewed[TDocument](TDocument document)

at Octopus.Server.Web.Infrastructure.OctopusQueryExecutor.Load[TDocument](String id)

at Octopus.Server.Web.Api.Actions.DeploymentProcessUpdater.ConvertAction(DeploymentProcess process, DeploymentActionResource action)

at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

at Octopus.Server.Web.Api.Actions.DeploymentProcessUpdater.ConvertStep(DeploymentProcess process, DeploymentStepResource step)

at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

at System.Collections.Generic.List1..ctor(IEnumerable1 collection)

at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

at Octopus.Server.Web.Api.Actions.DeploymentProcessUpdater.ConvertSteps(DeploymentProcess process, IEnumerable`1 resources)

at Octopus.Server.Web.Api.Actions.DeploymentProcessUpdater.Update(DeploymentProcess model, DeploymentProcessResource resource)

at Octopus.Server.Web.Api.Actions.DeploymentProcessUpdateAction.ExecuteRegistered(String id)

at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)

at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)

at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)

at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

#16

It sounds like the document(s) being imported still have references to things in the other space. Presumably the project was referencing an actionTemplate with an ID ActionTemplates-12 that was in the other space which it can no longer find. You mentioned that you had to create new ones so you may need to manually update the exported project information to change the action template ID. Same with the space Id. The exported document must still be referencing Spaces-1 so that will also need to be modified to reference the new space Id.
As you have found the import\export was never built with spaces in mind so while it may serve as a work around for the time being until we make something first class, it may require some additional manual handling.
Cheers,
Rob

(system) closed #17

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