I am following the following link to set up a High Availability server on an Azure hosted windows 2019 VM using Octopus v2021.3
My share is successfully mounted as a local drive R: (for Repository), T: (TaskLogs), Z: (Artifacts)
Drives are mapped by service account and have full access to the directory.
I created a Symlink to the shared drive
mklink /D “C:\Octo\Repository” “R:\Repository”
mklink /D “C:\Octo\Task_Logs” “T:”
mklink /D “C:\Octo\Artifacts” “Z:”
Changed the path
$octopus = “C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe”
$newNuGetRepository = “C:\Octo\Repository”
$newArtifacts = “C:\Octo\Artifacts”
$newTaskLogs = “C:\Octo\Task_Logs”
& “$octopus” path --nugetRepository="$newNuGetRepository"
& “$octopus” path --artifacts="$newArtifacts"
& “$octopus” path --taskLogs="$newTaskLogs"
I’m getting below errors accessing task logs and repository. Can you please suggest?
System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octo\Task_Logs\scheduledtasks_processrecurringscheduleddeployments.txt’.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileMode mode, FileAccess access, FileShare share)
at Octopus.Server.Orchestration.Logging.Processors.AppendToLogFile.InitializeInternal() in ./source/Octopus.Server/Orchestration/Logging/Processors/AppendToLogFile.cs:line 44
at Octopus.Server.Orchestration.Logging.ServerLogStorage.BuildWriter(RootCorrelationId rootCorrelationId) in ./source/Octopus.Server/Orchestration/Logging/ServerLogStorage.cs:line 190
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory)
at Nancy.NancyEngine.InvokeOnErrorHook(NancyContext context, ErrorPipeline pipeline, Exception ex)
2022-02-15 18:35:57.4081 3752 54 ERROR Unhandled error on request: “Could not find a part of the path ‘C:\Octo\Repository\Spaces-82\feeds-builtin\CloudOpsTools_ADDS’.”
System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octo\Repository\Spaces-82\feeds-builtin\CloudOpsTools_ADDS’.