Error Occue While Deploy On Azure

When I Deploy on Azure And If I Change release Version At octopus And Assembly Version (In Dot Net Code) and Nuget Version Is different From It then I Got Error That
"The remote script failed with exit code 1".

Executing script on tentacle 'DEVWEB03’
GAC Version Location

True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Deployment…
Finding path to package step: Insight-OctopusDeployment
Package was installed to: C:\Octopus\Applications\Production Server\Insight\
Skipping delete actions on App_Data
Publishing Website
The remote script failed with exit code 1


Thanks for reaching out. Could you tell us which version of Octopus are you running, and also send us the full log of the deployment that failed?




Version of Octopus server is “Octopus.” and “Octopus.Tentacle.”.
And one more question that polling mode when when polls again. Means what is the time period of polling mode.

Megha Sharma

ServerTasks-507.log.txt (9 KB)

I have unable to find error when it comes.


ServerTasks-531.log.txt (6 KB)

Hi Megha,

Thanks for those logs.

In there you see the cause :

" “Web Deploy cannot modify the
10:56:48 Verbose | file ‘AllLogs.log’ on the destination because it is locked by an external
10:56:48 Verbose | process. In order to allow the publish operation to succeed, you may need to
10:56:48 Verbose | either restart your application to release the lock, or use the AppOffline
10:56:48 Verbose | rule handler for .Net applications on your next publish attempt.”

Does AllLogs.log sound like a file that your application has open and locked ? Because webdeploy can’t change that file (Octopus is calling WebDeploy to deploy to Azure) it’s returning an error.

I have a few suggestions which may fix the problem.

  1. Do you need the log file at all ? Is anybody reading it ? You may be able to stop logging to that file at all if it’s not necessary.
  2. What does your logging code look like ? You could use something that doesn’t lock the file so aggressively.
  3. If you are using Octopus Deploy 3.1 you could put your log file in App_Data, and as part of the Azure Web App deploy step you could check the “Preserve App_Data” option which won’t sync that directory.

Hope that helps!