Error Occue While Deploy On Azure

Hi,
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’
Info
GAC Version Location
Info


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

Hi,

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?

http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Thanks,

Dalmiro

Hi,

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

Thanks
Megha Sharma

ServerTasks-507.log.txt (9 KB)

Hi,
I have unable to find error when it comes.

Thanks
Megha

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. http://docs.octopusdeploy.com/display/OD/Deploying+a+package+to+an+Azure+Web+App

Hope that helps!

Damian