hello,
I am deploying a Windows Service project through Octopus. My Octopus is 3.2.11. The target server is Windows Server 2008 R2.
I use template come with Octopus to install the windows service. The template should take care of stopping service, purging old files, copying new files and installing and starting new window service.
But I got access denial to purge old files. Here is the error message. Seems the Octopus template not working for my project.
Does anyone run in same problem as I did? Thanks a lot if you can share your solution !
The following is the error from Octopus --------------------------------------
The Batch VIN Service service already exists; it will be stopped
17:19:47Info
Stopping the Batch VIN Service service
17:19:47Info
Service Batch VIN Service stopped
17:19:47Info
Purging the directory 'c:\batchvin\win_service’
17:20:48Error
System.UnauthorizedAccessException: Access to the path ‘c:\batchvin\win_service\BatchVIN.dll’ is denied.
17:20:49Error
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
17:20:49Error
at System.IO.File.InternalDelete(String path, Boolean checkHost)
17:20:49Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.DeleteFile(String path, FailureOptions options) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 107
17:20:49Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, FailureOptions options, CancellationToken cancel, Boolean includeTarget) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 309 17:20:49Error at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate
1 include, FailureOptions options) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 286
17:20:49Error
at Calamari.Deployment.Conventions.CopyPackageToCustomInstallationDirectoryConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari\Deployment\Conventions\CopyPackageToCustomInstallationDirectoryConvention.cs:line 39
17:20:49Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
17:20:49Error
at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 28
17:20:49Error
Running rollback conventions…
17:20:49Error
System.UnauthorizedAccessException: Access to the path ‘c:\batchvin\win_service\BatchVIN.dll’ is denied.
17:20:49Error
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
17:20:49Error
at System.IO.File.InternalDelete(String path, Boolean checkHost)
17:20:49Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.DeleteFile(String path, FailureOptions options) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 107
17:20:49Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate1 include, FailureOptions options, CancellationToken cancel, Boolean includeTarget) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 309 17:20:49Error at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.PurgeDirectory(String targetDirectory, Predicate
1 include, FailureOptions options) in Y:\work\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 286
17:20:49Error
at Calamari.Deployment.Conventions.CopyPackageToCustomInstallationDirectoryConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari\Deployment\Conventions\CopyPackageToCustomInstallationDirectoryConvention.cs:line 39
17:20:49Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
17:20:49Error
at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 50
17:20:49Error
at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments) in Y:\work\14ffc968155e4956\source\Calamari\Commands\DeployPackageCommand.cs:line 109
17:20:49Error
at Calamari.Program.Execute(String[] args) in Y:\work\14ffc968155e4956\source\Calamari\Program.cs:line 38
17:20:49Fatal
The remote script failed with exit code 100