Hi,
We are using Octopus 3.0.4.2105 and when we try to use New-OctopusArtifact to get log file we have exception in Octopus Tentacle log and script hung forever.
This is probably because this method New-OctopusArtifact should try open file in read only mode.
This log file I can open for example in Notepad application.
System.IO.IOException: The process cannot access the file ‘E:\WebApplication\logs\2016-04-22.log’ because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileMode mode, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 184
at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 177
at Octopus.Tentacle.Services.FileTransfer.FileTransferService.<>c__DisplayClass4_0.b__0(Stream writer) in Y:\work\refs\tags\3.3.2\source\Octopus.Tentacle\Services\FileTransfer\FileTransferService.cs:line 37
at Halibut.Transport.Protocol.MessageExchangeStream.WriteEachStream(IEnumerable1 streams) in y:\work\7ab39c94136bc5c6\source\Halibut\Transport\Protocol\MessageExchangeStream.cs:line 275 at Halibut.Transport.Protocol.MessageExchangeStream.Send[T](T message) in y:\work\7ab39c94136bc5c6\source\Halibut\Transport\Protocol\MessageExchangeStream.cs:line 143 at Halibut.Transport.Protocol.MessageExchangeProtocol.ProcessClientRequests(Func
2 incomingRequestProcessor) in y:\work\7ab39c94136bc5c6\source\Halibut\Transport\Protocol\MessageExchangeProtocol.cs:line 110
at Halibut.Transport.SecureListener.ExecuteRequest(TcpClient client) in y:\work\7ab39c94136bc5c6\source\Halibut\Transport\SecureListener.cs:line 126