Azure WebJob 部署不断失败

标签 azure deployment azure-webjobs msdeploy webjob

从昨天开始,我的现有 WebJobs 突然出现一致的部署失败。我收到的错误是

Start Web Deploy Publish the Application/package to https://octotrip-api-test-dev.scm.azurewebsites.net/msdeploy.axd?site=octotrip-api-test__dev ...
Adding sitemanifest (sitemanifest).
Adding directory (XXX\app_data).
Adding directory (XXX\app_data\jobs).
Adding directory (XXX\app_data\jobs\continuous).
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4295,5): Error : Web deployment task failed. ((3/16/2017 1:32:23 PM) An error occurred when the request was processed on the remote computer.)

(3/16/2017 1:32:23 PM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing operation 'Create Directory' on 'D:\home\site\wwwroot\app_data\jobs\continuous'.
The error code was 0x800700B7.
Cannot create "D:\home\site\wwwroot\app_data\jobs\continuous" because a file or directory with the same name already exists.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.DirectoryEx.CreateDirectory(String path)
at Microsoft.Web.Deployment.DirPathProviderBase.CreateDirectory(String fullPath, DeploymentObject source)
at Microsoft.Web.Deployment.DirPathProviderBase.Add(DeploymentObject source, Boolean whatIf)
Publish failed to deploy.

需要注意的是,在部署时;没有app_data文件夹(我使用FTP手动删除它)。可以看到它正在逐步创建文件夹结构; app_data,然后是作业文件夹,然后是连续文件夹。我使用FTP确认他成功创建了app_data/jobs文件夹;但创建连续文件夹始终会崩溃。

当使用 VSTS 中的构建定义进行部署以及从 Visual Studio 中部署为 WebJob 时,会发生这种情况;所有 WebJob NuGet 都是最新的。

谢谢

最佳答案

很奇怪的是,无法为 WebJob 创建文件夹。我无法在我身边重现它。您是否尝试将其部署到其他网站以检查是否可以重现? 根据我的经验,我们可以通过以下方式解决问题:

  1. 重新启动网站

  2. 如果可能,请尝试重新部署网站并删除目标位置的其他文件

enter image description here

  • 扩大和缩小服务计划
  • Note:change will be applied to all WebApps in the ServicePlan

  • 如果未解决,请联系 Azure 支持团队寻求帮助。
  • 关于Azure WebJob 部署不断失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42826912/

    相关文章:

    node.js - 具有 Azure 功能的无服务器框架

    azure - ARM 模板清理

    ios - Azure + Swift 推送通知

    deployment - 部署 web-ear 时 sun.reflect.annotation.TypeNotPresentExceptionProxy 错误

    vb.net - .msi 文件中的长时间延迟问题

    git - Git中如何实现一个部署分支

    Azure WebJobs 大小限制

    node.js - 如何从移动服务中 "wake-up"Azure webjob?

    powershell - 使用 Powershell 使用 Azure VM 创建自动关闭策略

    visual-studio-2013 - 无法使用 Azure SDK 2.4 发布重复发生 15 分钟的 Web 作业