Tentacle upgrade to 2.0

Hi,

I’ve had some issues running the powershell upgrade script here: http://docs.octopusdeploy.com/display/OD/Upgrading+from+Octopus+1.6#UpgradingfromOctopus1.6-UpgradingTentacles

On my windows 2003 server, the $env:SystemDrive variables are not getting translated and I’m getting invalid paths. ie “$env:SystemDrive:\Octopus” becomes just “\Octopus” instead of “C:\Octopus”

I’ve re-run each line of the script and now the below line is failing with attached output.
& .\tentacle.exe configure --instance "Tentacle" --home "C:\Octopus" --console

The Octopus Tentacle Manager throws a similar unhandled exception. Screenshot attached.

Any idea how to move forward from here?

I’ve tried to delete all traces of Octopus from this server and start again. Uninstalled 2.0 tentacle, removed 1.6 tentacle service, deleted all Octopus reg keys. When re-installing 2.0 tentacle I now get the tentacle wizard which I didnt get before. Wizard fails on final step having clicked the big green Install button. output below

@@@
Saving instance: Tentacle

A fatal exception occurred
Autofac.Core.DependencyResolutionException: An exception was thrown while executing a resolve operation. See the InnerException for details. —> The path is not of a legal form. (See inner exception for details.) —> System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Directory.GetDirectoryRoot(String path)
at Octopus.Shared.Configuration.HomeConfiguration…ctor(ApplicationName application, IKeyValueStore settings) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\HomeConfiguration.cs:line 19
at Octopus.Shared.Configuration.ConfigurationModule.b__2(IComponentContext c) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ConfigurationModule.cs:line 37
at Autofac.RegistrationExtensions.<>c__DisplayClass101.<Register>b__f(IComponentContext c, IEnumerable1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass11.<ForDelegate>b__0(IComponentContext c, IEnumerable1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.b__0()
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass2.<CanSupplyValue>b__0() at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.<Execute>b__0() at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters)
— End of inner exception stack trace —

Server stack trace:
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.<CreateLazyRegistration>b__4() at System.Lazy1.CreateValue()

Exception rethrown at [0]:
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.<CreateLazyRegistration>b__4() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at Octopus.Shared.Configuration.LogInitializer.InitializeLogs() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\LogInitializer.cs:line 38
at System.Action.Invoke()
at Octopus.Shared.Configuration.ApplicationInstanceSelector.OnLoaded() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 95
at Octopus.Shared.Configuration.ApplicationInstanceSelector.Load(ApplicationInstanceRecord record) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 89
at Octopus.Shared.Configuration.ApplicationInstanceSelector.LoadInstance(String instanceName) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 61
at Octopus.Shared.Startup.AbstractStandardCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\AbstractStandardCommand.cs:line 21
at Octopus.Tentacle.Commands.ConfigureCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tentacle\Commands\ConfigureCommand.cs:line 62
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\AbstractCommand.cs:line 42
at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\OctopusProgram.cs:line 157
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\ConsoleHost.cs:line 34

Error: The previous command returned a non-zero exit code of: 100
Error: The command that failed was: “C:\Program Files\Octopus Tentacle 2.0\Agent\Tentacle.exe” configure --instance “Tentacle” --home “C:\Octopus”
Deleted instance: Tentacle

@@@

If I click the “show script” link in the wizard it shows the attached commands.

Hi,

Thanks for letting us know about this, I’ve fixed up the scripts.

Not sure about that exception but it could be related to the paths being invalid. Can you:

  1. Uninstall Tentacle
  2. Delete the entries under HKLM\Software\Octopus
  3. Delete the files under C:\Octopus\Tentacle (which may still have the bad old paths)
  4. Try it again

Paul

Hi Paul,

Followed the above steps, but still received the same error.

@@@
Creating empty configuration file: C:\Octopus\Tentacle\Tentacle.config
Saving instance: Tentacle

A fatal exception occurred
Autofac.Core.DependencyResolutionException: An exception was thrown while executing a resolve operation. See the InnerException for details. —> The path is not of a legal form. (See inner exception for details.) —> System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Directory.GetDirectoryRoot(String path)
at Octopus.Shared.Configuration.HomeConfiguration…ctor(ApplicationName application, IKeyValueStore settings) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\HomeConfiguration.cs:line 19
at Octopus.Shared.Configuration.ConfigurationModule.b__2(IComponentContext c) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ConfigurationModule.cs:line 37
at Autofac.RegistrationExtensions.<>c__DisplayClass101.<Register>b__f(IComponentContext c, IEnumerable1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass11.<ForDelegate>b__0(IComponentContext c, IEnumerable1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.b__0()
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass2.<CanSupplyValue>b__0() at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.<Execute>b__0() at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters)
— End of inner exception stack trace —

Server stack trace:
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.<CreateLazyRegistration>b__4() at System.Lazy1.CreateValue()

Exception rethrown at [0]:
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.<CreateLazyRegistration>b__4() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at Octopus.Shared.Configuration.LogInitializer.InitializeLogs() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\LogInitializer.cs:line 38
at System.Action.Invoke()
at Octopus.Shared.Configuration.ApplicationInstanceSelector.OnLoaded() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 95
at Octopus.Shared.Configuration.ApplicationInstanceSelector.Load(ApplicationInstanceRecord record) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 89
at Octopus.Shared.Configuration.ApplicationInstanceSelector.LoadInstance(String instanceName) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Configuration\ApplicationInstanceSelector.cs:line 61
at Octopus.Shared.Startup.AbstractStandardCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\AbstractStandardCommand.cs:line 21
at Octopus.Tentacle.Commands.ConfigureCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tentacle\Commands\ConfigureCommand.cs:line 62
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\AbstractCommand.cs:line 42
at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\OctopusProgram.cs:line 157
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\ConsoleHost.cs:line 34

Error: The previous command returned a non-zero exit code of: 100
Error: The command that failed was: “C:\Program Files\Octopus Tentacle 2.0\Agent\Tentacle.exe” configure --instance “Tentacle” --home “C:\Octopus”
Deleted instance: Tentacle

@@@

The machine’s system properties are attached. Does it matter that the machine has no C:\Program Files (x86) directory?

Server.PNG

Could you attach the contents of: C:\Octopus\Tentacle\Tentacle.config?

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

Hi,

I’m getting the same error as dav upgrading to 2.0 from 1.6. I have tried the steps of completely uninstalling both versions, deleting the registry entries and the files under the C:\Octopus\Tentacle folder but am still getting the same error.

The servers I’m trying to install it on are 2003 but they have necessary requirements for running the tentacles. I have also tried installing to an alternate path on E:\Octopus instead but with the same error at the same spot - that is running tentacle.exe configure --instance “Tentacle” --home “E:\Octopus”

Also the contents of Tentacle.config in E:\octopus\tentacle for me were
<?xml version='1.0' encoding='UTF-8' ?><octopus-settings></octopus-settings>

Thanks, it looks like we might have a problem with one of our paths on
Windows Server 2003. I’ll investigate.

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

Hi Paul,

Pretty empty tentacle config attached.

Tentacle.config (76 Bytes)

I have the same issue, also on WinServer 2003 R2 SP2. I started and deleted another thread on the same topic.

Same here :slight_smile:

We’ve found the issue here; we’ll track this with: https://github.com/OctopusDeploy/Issues/issues/400 (fix coming soon).

Just installed RC4 and it worked perfectly.

Great, thanks for the follow-up.

Installed 2.0.8.977 on win2003 sp2, now works like a charm, thanks