Deployment failure "process cannot access the file"

Hello,
Am facing an issue. Am constantly getting below error message when trying to perform a deployment - even of a simple Powershell script. I have even uninstall and re install Octopus and Tentacles but the error still manifesting.

I have tried on different browser, clear cookie, clear session but of no vain.

Error:

The step failed: Activity helloworld on localhost failed with error 'The process cannot access the file because it is being used by another process.

Server exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.IO.IOException: The process cannot access the file because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at Halibut.Transport.Protocol.TemporaryFileStream.SaveTo(String filePath)
at System.Collections.Generic.List1.ForEach(Action1 action)

Also, from OctopusTentacle.txt, i can see this error happening:

016-12-07 16:43:16.8479 23 INFO listen://[::]:10933/ 23 Unhandled error when handling request from client: [::ffff:127.0.0.1]:55451
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Halibut.Transport.SecureListener.ExecuteRequest(TcpClient client)
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Halibut.Transport.SecureListener.ExecuteRequest(TcpClient client)

Hi Oozeerf,
Im sorry to see that you are having some issues with your deployment. So that we can try and diagnose the cause a little better could you provide some background as to what part of the step was executing when this occurred? It sounds like its a problem on the target and should have nothing to do with the browser. Was it package acquisition, pushing a Calamari update, running the script? Ideally the full server logs for this task would be great to go over. One thing that we do occasionaly hear causing issues that sound very similar, is if you have a virus scanner running on the tentacle. It is possible that the virus protection will take a handle on the file as soon as Halibut tries to upload it from the server causing a file lock to occur. Could you confirm if you have a virus scanner potentially running that could be causing this?
Thanks for the additional information,
Rob

Hi Rob,

Thanks for your time in answering this queries.

Yes I do confirm I have a virus scanner but until yesterday it was working absolutely fine with the scanner enabled and everything.

What I noticed is that I was uploading a package via the upload page(internal Octopus feed) and after the package uploaded I was given a message, more a warning message “The resource cannot be found on this server”.

When I check, the package was upload properly with the correct size. All the issue started to happen at that point in time. To mention, it is the second time I got this issue. The last time I had to remove Octopus and re-install afresh.

Regards,

Faldeen

[Proximity_BBDO test]

Faldeen Oozeer | Proximity Sitecore Admin | Release Engineer | Tel : +230 466 2982 | SCA Support Mob : +230 5-254-4749
O° Proximity BBDO Indian Ocean | 4th Floor, BG Court, St Jean Road | Quatre Bornes 72109 | Mauritius | www.proximity.bbdo.frhttp://www.proximity.bbdo.fr/

| 2013 | Agence Customer Marketing Intégré de l’Année
| EFFIE_Argent_Automobile | EFFIE_Argent_Biens d’équipement | FWA

P Think green, don’t print me

image001.png

Hi,
So after a package upload took place it looks like it completed but you got a warning saying “The resource cannot be found on this server”, and although it looked like it uploaded fine based on its size, you started getting the “file is in use” error? Is this correct. There could be a process on the tentacle that takes a lock on the file. Did you try restart the Tentacle service and/or manually remove the offending package from the Target? Could you please include the Server and Tentacle logs for when this takes place? Perhaps to also remove any doubt, when this occurs could you try temporarily stop an disable the virus scanner to rule that our as being related.
Cheers
Robert