Strange error during Tentacle upgrade

Hi

Did a tentacle upgrade today and all but 1 succeded :).
Yeahh.

But one tentacle failed and gave me the error below.
Strangely enough there was no error in the local tentacle log files and nothing in the event log, BUT apperently the tentacle had been upgraded and responded ok when I did an env check.
Smells a lot like an exception which I was not supposed to see :).

The actor TentaclePackageDeployment-Uw-AT7kzTNwaQ@SQ-TESTWORKERS200-1A9A8273 cannot handle failure Octopus.Tentacle.Orchestration.Deploy.Mutex.AcquireCommand
System.InvalidOperationException: The actor TentaclePackageDeployment-Uw-AT7kzTNwaQ@SQ-TESTWORKERS200-1A9A8273 cannot handle failure Octopus.Tentacle.Orchestration.Deploy.Mutex.AcquireCommand
at Pipefish.Actor.OnHandleFailedTyped[TBody](Message deliveryFailure, Message failedMessage, Error error) in y:\work\3cbe05672d69a231\source\Pipefish\Actor.cs:line 169
Tentacle version 2.5.7.384
Fatal 19:39:24
The message could not be handled
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalReplace(String sourceFileName, String destinationFileName, String destinationBackupFileName, Boolean ignoreMetadataErrors)
at Pipefish.Persistence.Filesystem.ActorStateFile.Save(ActorStateDictionary state) in y:\work\3cbe05672d69a231\source\Pipefish\Persistence\Filesystem\ActorStateFile.cs:line 91
at Pipefish.PersistentActor1.Save() in y:\work\3cbe05672d69a231\source\Pipefish\PersistentActor.cs:line 62 at Pipefish.PersistentActor1.d__0.MoveNext() in y:\work\3cbe05672d69a231\source\Pipefish\PersistentActor.cs:line 49
Tentacle version 2.5.7.384

Correction, it now showed up again, ready for tentacle upgrade.
I started one and got the same error again.
Can you tell which PATH it is which might for some strange reason have received another set of access rights which I should check out?

Ok I gave all members of Users full control over C:\Octopus.
Tried againg and got this:

2014-09-02 20:05:52.8755 INFO Beginning transfer of C:\Octopus\Files\Octopus.Tentacle.2.5.8.447.nupkg-a26cc7dd-c78e-47a0-ab4d-5c907aeb42ed
2014-09-02 20:05:58.9070 INFO Reconfiguring the Octopus Tentacle Windows Service to use path: C:\Octopus\Applications.SQ-TESTWORKERS200-1A9A8273\Octopus.Tentacle\2.5.8.447_2\Tentacle.exe
2014-09-02 20:05:58.9070 INFO Tentacle instance: Tentacle
2014-09-02 20:05:59.0477 INFO Octopus Deploy: Tentacle version 2.5.8.447
2014-09-02 20:06:10.1419 ERROR [SC] OpenService FAILED 5:

Access is denied.

2014-09-02 20:06:10.2982 INFO [SC] OpenService FAILED 5:
2014-09-02 20:06:10.2982 INFO Access is denied.
2014-09-02 20:06:10.3138 ERROR [SC] OpenService FAILED 5:

Access is denied.

2014-09-02 20:06:10.3138 INFO [SC] OpenService FAILED 5:
2014-09-02 20:06:10.3138 INFO Service reconfigured
2014-09-02 20:06:10.3138 INFO Access is denied.
2014-09-02 20:06:10.3138 INFO Service reconfigured
2014-09-02 20:06:10.4076 INFO Reconfiguration complete!
2014-09-02 20:06:18.8611 INFO Stopping service…
2014-09-02 20:06:20.3768 FATAL System.InvalidOperationException: Cannot open OctopusDeploy Tentacle service on computer ‘.’. —> System.ComponentModel.Win32Exception: Access is denied
— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.GetServiceHandle(Int32 desiredAccess)
at System.ServiceProcess.ServiceController.Stop()
at Octopus.Shared.Startup.ServiceCommand.Start() in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ServiceCommand.cs:line 77
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 55
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36
2014-09-02 20:07:03.4568 INFO Distribution service listening on: 10933

Followup by green lights in the gui:

Upgrading https://testworkers200.prod.local:10933/
Info 20:07:09
The Tentacle is upgraded
Upload the new Tentacle package
Deploy the Tentacle package
Info 20:05:55
Beginning deployment…
Info 20:06:10
Deployment complete.
Deploy.ps1
Info 20:05:58
Reconfiguring the Octopus Tentacle Windows Service to use path: C:\Octopus\Applications.SQ-TESTWORKERS200-1A9A8273\Octopus.Tentacle\2.5.8.447_2\Tentacle.exe
Info 20:05:58
Tentacle instance: Tentacle
Info 20:05:59
Octopus Deploy: Tentacle version 2.5.8.447
Info 20:06:10
[SC] OpenService FAILED 5:
Info 20:06:10
Access is denied.
Info 20:06:10
[SC] OpenService FAILED 5:
Info 20:06:10
Access is denied.
Info 20:06:10
Service reconfigured
Info 20:06:10
Reconfiguration complete!
Restart the Tentacle service
Info 20:06:13
The Tentacle has received a request to shut down and restart
Info 20:07:08
The Tentacle restarted running version 2.5.7.384.

Then I manually stopped the service and started it.

Again it popped up as not upgraded.

Hit the button more time and this time it finally worked :).

Still strange since i do not know why some access right all of the suddenly was wrong, if indeed that was the problem.
Maybe the tentacle was “in the woods” so to speak?

Hi Christian!

Nice job working through this, I’m surprised a permissions issue has popped up out of the blue like this - but perhaps some group policy took effect, or other auth change occurred on the machine?

We keep a list of permissions required for Tentacle user accounts here: http://docs.octopusdeploy.com/display/OD/Running+Tentacle.exe+under+a+specific+user+account

If your experience showed anything is missing from that list please let me know and I’ll correct it.

Best regards,
Nick