Intermittent System.UnauthorizedAccessException

I’m trying out the new Octupus deploy 3 prerealease, but I have an intermittent problem when deploying a windows service. It’s being deployed to a testserver, running a tentacle under the administrative account.

However once in a while I get a System.UnauthorizedAccessException when deployment is purging the installation directory - if I use the “try again” option it will then work the second time without any changes at all. I have replaces some sensitive information in yhe below and replaced with asterisks.

The *** service already exists; it will be stopped
Info 09:45:41
Stopping the **** service
Info 09:45:41
Transforming ‘C:\Octopus\Applications****\1.0.0.3051****.exe.config’ using ‘C:\Octopus\Applications****\1.0.0.3051****.exe.Test.config’.
Info 09:45:41
No matching setting or connection string names were found in: C:\Octopus\Applications***\1.0.0.3051*.exe.config
Info 09:45:41
No matching setting or connection string names were found in: C:\Octopus\Applications*
\1.0.0.3051****.exe.Test.config
Info 09:45:41
Purging the directory 'c:****'
Error 09:45:45
System.UnauthorizedAccessException: Access to the path ‘c:****\Logning.dll’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
Error 09:45:45
at System.IO.File.InternalDelete(String path, Boolean checkHost)
Error 09:45:45
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.DeleteFile(String path, DeletionOptions options) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 83
Error 09:45:45
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, DeletionOptions options, CancellationToken cancel, Boolean includeTarget) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 247 Error 09:45:45 at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, DeletionOptions options) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 224
Error 09:45:45
at Calamari.Deployment.Conventions.CopyPackageToCustomInstallationDirectoryConvention.Install(RunningDeployment deployment) in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\Conventions\CopyPackageToCustomInstallationDirectoryConvention.cs:line 39
Error 09:45:45
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 60
Error 09:45:45
at Calamari.Deployment.ConventionProcessor.RunConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 28
Error 09:45:45
Running rollback conventions…
Error 09:45:45
Access to the path ‘c:****\Logning.dll’ is denied.
Info 09:45:45
System.UnauthorizedAccessException: Access to the path ‘c:****\Logning.dll’ is denied.
Info 09:45:45
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
Info 09:45:45
at System.IO.File.InternalDelete(String path, Boolean checkHost)
Info 09:45:45
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.DeleteFile(String path, DeletionOptions options) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 83
Info 09:45:45
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, DeletionOptions options, CancellationToken cancel, Boolean includeTarget) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 247 Info 09:45:45 at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, DeletionOptions options) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 224
Info 09:45:45
at Calamari.Deployment.Conventions.CopyPackageToCustomInstallationDirectoryConvention.Install(RunningDeployment deployment) in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\Conventions\CopyPackageToCustomInstallationDirectoryConvention.cs:line 39
Info 09:45:45
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 60
Info 09:45:45
at Calamari.Deployment.ConventionProcessor.RunConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 50
Info 09:45:45
at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments) in y:\work\b1fd300731d5f2fc\source\Calamari\Commands\DeployPackageCommand.cs:line 104
Info 09:45:45
at Calamari.Program.Main(String[] args) in y:\work\b1fd300731d5f2fc\source\Calamari\Program.cs:line 18
Error 09:45:45
The remote script failed with exit code 100

Hi,

Thanks for getting in touch! We have a support forum dedicated for 3.0 which you can find on this link: http://community.octopusdeploy.com/

We are trying to keep 3.0 pre-release issues separate for the time being. The devs are constantly checking and answering 3.0 related questions and issues on that forum, and it is also where other customers are reporting or answering questions like yours.

So if you could please sign up on that forum and report this issue, you’re not only gonna get an answer from the dev that is actively working on this, but you’re also gonna help us tackle down issues of the pre-release.

Thanks!

Dalmiro