Sunday, 8 January 2012

Failed to run method 'Microsoft.Web.Farm.SyncApplicationsRemoteMethod'on server

I have currently been having an issue with Web Farm Framework 2 not provisioning my applications correctly. I would receive and error message saying that it could not delete the temp app pool file on the secondary server.

Failed to run operation 'ProvisionApplications'.
Failed to run method 'Microsoft.Web.Farm.SyncApplicationsRemoteMethod' on server 'xx.xx.xx.xx'.
Exception in response stream. An error was encountered when processing operation 'Delete File' on 'APCE41E.tmp'.
The error code was 0x80070020.
The process cannot access 'C:\inetpub\temp\appPools\APCE41E.tmp' because it is being used by another process.
Exception in response stream. An error was encountered when processing operation 'Delete File' on 'APCE41E.tmp'.
The error code was 0x80070020.
The process cannot access 'C:\inetpub\temp\appPools\APCE41E.tmp' because it is being used by another process.

This can be resolved by ignoring the appPool temp files from the sync. To do edit the the ignore list in c:\windows\system32\inetsrv\config\applicationHost.config on the web farm controller so that the web farm includes the following skip directives.

<webFarm>
<applicationProvision offlineWhileSync="true" syncWebServerFromPrimary="true" periodicSync="00:00:30">
<clear />
<skipDirectives>
<skip name="appPools" skipDirective="objectName=dirPath,absolutePath=.*appPools.*" />
<skip name="logFiles" skipDirective="objectName=dirPath,absolutePath=.*LogFiles.*" />
</skipDirectives>
</applicationProvision>
</webFarm>

1 comment:

  1. Kris Van de Vijver10 January 2012 at 03:26

    Good to know there's a skip list for this. Thanks..

    ReplyDelete