Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy sync error: maximum number of sync passes '5' has been exceeded

Tags:

webdeploy

When running a web deploy to a specific IIS site I get the following error:

Error: The synchronization is being stopped because the maximum number of sync passes '5' has been exceeded even though all the changes could not be applied. This could occur if there are external changes being made to the destination.
 At C:\Code\.....\deploy.ps1:185 char:10
 +         & <<<< ($appDeployCmd) $type /M:$url /U:$user /P:$pass /A:Basic -allowUntrusted -useCheckSum
 + CategoryInfo          : NotSpecified: (Error: The sync...he destination.:String) [], RemoteException
 + FullyQualifiedErrorId : NativeCommandError

Web Deploy is working fine on this environment against other IIS sites and file syncs are also working. I have previously been able to use web deploy to deploy this specific site without issue. All of the sudden out of nowhere, this issue started happening and I can no longer deploy this site.

I'm doing a basic site deploy with a package built from msbuild. I don't think the specifics are that important because as I said this was all working before and currently works against other sites on the same server farm without issues.

The error message says:

"This could occur if there are external changes being made to the destination."

but I'm not sure how to track this down or if it is even the issue to begin with. I've made sure all explorer windows are closed in all remote sessions. I've tried restarting the site and the app pool. The only thing I have not tried is rebooting the server which is not possible at moment.

Any ideas what might be cause this web deploy to fail?

like image 396
ennui77 Avatar asked Jan 25 '12 21:01

ennui77


2 Answers

We had this problem when converting from a previously adhoc deploy of a service to MSDeploy, and found that if there were files that were either

  • marked as read-only via the DOS/Windows read-only file attribute.
  • inaccessible due to ACLs

then we would get the "maximum number of sync passes" error on deploying.

Once we fixed the attributes/ACLs, we were able to sync.

like image 74
Chris R. Donnelly Avatar answered Oct 20 '22 15:10

Chris R. Donnelly


In my case I couldn't fix it but realised the deployment worked regardless. If you are reading this I wouldn't suggest to just assume it worked, and if it did that it deployed fully, but consider that it may be a false alarm!

like image 41
Stefano Avatar answered Oct 20 '22 16:10

Stefano